X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fpoller.php;h=46f1079fd11c74042fd372f83ab1f7b14d17f633;hb=660bd39efad52b1c69bd8dd0ca27141b81f84ca5;hp=084067b190059c3c6f0290b2476811b1f2c87d82;hpb=29092ace4428aeb796b31856aafa14cef1632bac;p=friendica.git diff --git a/include/poller.php b/include/poller.php index 084067b190..46f1079fd1 100644 --- a/include/poller.php +++ b/include/poller.php @@ -41,11 +41,17 @@ function poller_run(&$argv, &$argc){ } } - $lockpath = get_config('system','lockpath'); + $lockpath = get_lockpath(); if ($lockpath != '') { - $pidfile = new pidfile($lockpath, 'poller.lck'); + $pidfile = new pidfile($lockpath, 'poller'); if($pidfile->is_already_running()) { logger("poller: Already running"); + if ($pidfile->running_time() > 9*60) { + $pidfile->kill(); + logger("poller: killed stale process"); + // Calling a new instance + proc_run('php','include/poller.php'); + } exit; } }