forked from GNUsocial/gnu-social
Minor changes to OpportunisticQM for debugging
This commit is contained in:
parent
42dff2742a
commit
7fbf72f9c1
@ -24,7 +24,7 @@ class OpportunisticQueueManager extends DBQueueManager
|
|||||||
protected $started_at = null;
|
protected $started_at = null;
|
||||||
protected $handled_items = 0;
|
protected $handled_items = 0;
|
||||||
|
|
||||||
const MAXEXECTIME = 10; // typically just used for the /main/cron action, only used if php.ini max_execution_time is 0
|
const MAXEXECTIME = 20; // typically just used for the /main/cron action, only used if php.ini max_execution_time is 0
|
||||||
|
|
||||||
public function __construct(array $args=array()) {
|
public function __construct(array $args=array()) {
|
||||||
foreach (get_class_vars(get_class($this)) as $key=>$val) {
|
foreach (get_class_vars(get_class($this)) as $key=>$val) {
|
||||||
@ -114,7 +114,11 @@ class OpportunisticQueueManager extends DBQueueManager
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($this->handled_items > 0) {
|
||||||
common_debug('Opportunistic queue manager passed execution time/item handling limit without being out of work.');
|
common_debug('Opportunistic queue manager passed execution time/item handling limit without being out of work.');
|
||||||
|
} else {
|
||||||
|
common_debug('Opportunistic queue manager did not have time to start on this action (max: '.$this->max_execution_time.' exceeded: '.abs(time()-$this->started_at).').');
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user