X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fsmsqueuehandler.php;h=8f0d02d9b67f76e35b17add1357de82e8e867f23;hb=8deac7248e7db35515d7810491f9136deffa3098;hp=dc78d668044564ff87a0933e3aba5e4432a2d7e6;hpb=08d5107cf1a69c2640c96ee8a3d834541a530146;p=quix0rs-gnu-social.git diff --git a/scripts/smsqueuehandler.php b/scripts/smsqueuehandler.php index dc78d66804..8f0d02d9b6 100755 --- a/scripts/smsqueuehandler.php +++ b/scripts/smsqueuehandler.php @@ -28,37 +28,37 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('LACONICA', true); require_once(INSTALLDIR . '/lib/common.php'); -require_once(INSTALLDIR . '/lib/omb.php'); +require_once(INSTALLDIR . '/lib/mail.php'); require_once(INSTALLDIR . '/lib/queuehandler.php'); set_error_handler('common_error_handler'); -class SmsQueueHandler { +class SmsQueueHandler extends QueueHandler { function transport() { - return 'omb'; + return 'sms'; } function start() { + $this->log(LOG_INFO, "INITIALIZE"); return true; } function handle_notice($notice) { - mail_broadcast_notice_sms($notice); + return mail_broadcast_notice_sms($notice); } function finish() { } } +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 SmsQueueHandler($id); -if ($handler->start()) { - $handler->handle_queue(); -} - -$handler->finish(); +$handler->runOnce();