X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fsmsqueuehandler.php;h=8f0d02d9b67f76e35b17add1357de82e8e867f23;hb=85b9e58e535d44f5973fe14f888dc19f25bcaddd;hp=f6738053b79da563bf0b31277a3e1007a8a16661;hpb=972e03b158259219d02a4c1edb85fac71d52e0c7;p=quix0rs-gnu-social.git diff --git a/scripts/smsqueuehandler.php b/scripts/smsqueuehandler.php index f6738053b7..8f0d02d9b6 100755 --- a/scripts/smsqueuehandler.php +++ b/scripts/smsqueuehandler.php @@ -28,7 +28,7 @@ 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'); @@ -36,29 +36,29 @@ set_error_handler('common_error_handler'); 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();