}
function start() {
+ $this->log(LOG_INFO, "INITIALIZE");
return true;
}
function handle_notice($notice) {
- if (!$this->is_remote($notice)) {
- omb_broadcast_remote_subscribers($notice);
+ if ($this->is_remote($notice)) {
+ $this->log(LOG_DEBUG, 'Ignoring remote notice ' . $notice->id);
+ return true;
+ } else {
+ return omb_broadcast_remote_subscribers($notice);
}
}
function is_remote($notice) {
$user = User::staticGet($notice->profile_id);
- return !$user;
+ return is_null($user);
}
}
+ini_set("max_execution_time", "0");
+ini_set("max_input_time", "0");
+set_time_limit(0);
mb_internal_encoding('UTF-8');
$id = ($argc > 1) ? $argv[1] : NULL;
$handler = new OmbQueueHandler($id);
-if ($handler->start()) {
- $handler->handle_queue();
-}
-
-$handler->finish();
+$handler->runOnce();