]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/inboxqueuehandler.php
schema changes for user support of designs
[quix0rs-gnu-social.git] / scripts / inboxqueuehandler.php
old mode 100644 (file)
new mode 100755 (executable)
index 16e334b..73d31e8
@@ -29,6 +29,7 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
 define('LACONICA', true);
 
 require_once(INSTALLDIR . '/lib/common.php');
+require_once(INSTALLDIR . '/lib/queuehandler.php');
 
 set_error_handler('common_error_handler');
 
@@ -39,12 +40,21 @@ class InboxQueueHandler extends QueueHandler
         return 'inbox';
     }
 
+       function start() {
+               $this->log(LOG_INFO, "INITIALIZE");
+               return true;
+       }
+
     function handle_notice($notice)
     {
-        common_log(LOG_INFO, "Distributing notice to inboxes for $notice->id");
+        $this->log(LOG_INFO, "Distributing notice to inboxes for $notice->id");
         $notice->addToInboxes();
+        $notice->blowSubsCache();
         return true;
     }
+
+       function finish() {
+       }
 }
 
 ini_set("max_execution_time", "0");
@@ -52,6 +62,8 @@ ini_set("max_input_time", "0");
 set_time_limit(0);
 mb_internal_encoding('UTF-8');
 
-$handler = new InboxQueueHandler($resource);
+$id = ($argc > 1) ? $argv[1] : null;
+
+$handler = new InboxQueueHandler($id);
 
 $handler->runOnce();