if ($nconcurrent > 0 && $Queue->nahead >= $nconcurrent) { if ($tries) { $Conf->ajaxExit(array("onqueue" => true, "queueid" => $Queue->queueid, "nahead" => $Queue->nahead, "headage" => $Queue->head_runat ? $Now - $Queue->head_runat : null)); } clean_queue($Runner->queue, $qconf, $Queue->queueid); $Queue = load_queue($Queueid, $Info->repo); } else { break; } } // if we get here we can actually run } $checkt = time(); // maybe eval if (!$Runner->command && $Runner->eval) { $json = ContactView::runner_generic_json($Info, $checkt); $json->done = true; $json->status = "done"; runner_eval($Runner, $Info, $json); $Conf->ajaxExit($json); } // otherwise run try { $rs = new RunnerState($Info, $Runner, $Queue); // recent if (@$_REQUEST["check"] == "recent" && count($rs->logged_checkts)) { $Conf->ajaxExit(ContactView::runner_json($Info, $rs->logged_checkts[0], $Offset)); } else { if (@$_REQUEST["check"] == "recent") { quit("no logs yet"); }