mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:00:16 +00:00
Avoid the killing of the wrong process
This commit is contained in:
parent
0cd9db9cb7
commit
bae4569a0b
1 changed files with 2 additions and 2 deletions
|
@ -228,7 +228,7 @@ function poller_execute($queue) {
|
|||
|
||||
if (function_exists($funcname)) {
|
||||
|
||||
// We constantly update the "executed" date every minute to avoid being killed to soon
|
||||
// We constantly update the "executed" date every minute to avoid being killed too soon
|
||||
if (!isset($poller_last_update)) {
|
||||
$poller_last_update = strtotime($queue["executed"]);
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ function poller_max_connections_reached() {
|
|||
*
|
||||
*/
|
||||
function poller_kill_stale_workers() {
|
||||
$entries = dba::p("SELECT `pid`, `executed`, `priority`, `parameter` FROM `workerqueue` WHERE `executed` > ? AND NOT `done` AND `pid` != 0", NULL_DATE);
|
||||
$entries = dba::p("SELECT `pid`, `executed`, `priority`, `parameter` FROM `workerqueue` WHERE `executed` > ? AND NOT `done` AND `pid` != 0 ORDER BY `priority`, `created`", NULL_DATE);
|
||||
|
||||
while ($entry = dba::fetch($entries)) {
|
||||
if (!posix_kill($entry["pid"], 0)) {
|
||||
|
|
Loading…
Reference in a new issue