+ $lockpath = get_lockpath();
+ if ($lockpath != '') {
+ $pidfile = new pidfile($lockpath, 'queue');
+ if($pidfile->is_already_running()) {
+ logger("queue: Already running");
+ if ($pidfile->running_time() > 9*60) {
+ $pidfile->kill();
+ logger("queue: killed stale process");
+ // Calling a new instance
+ proc_run('php',"include/queue.php");
+ }
+ return;
+ }
+ }
+