123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class RunqueueAction extends Action
- {
- protected $qm = null;
- protected function prepare(array $args = [])
- {
- parent::prepare($args);
- $args = [];
- if ($this->arg('qmkey') !== null) {
- $args['qmkey'] = $this->arg('qmkey');
- }
- try {
- $this->qm = new OpportunisticQueueManager($args);
- } catch (RunQueueBadKeyException $e) {
- return false;
- }
- header('Content-type: text/plain; charset=utf-8');
- return true;
- }
- protected function handle() {
-
-
- if ($this->qm->runQueue() === true) {
-
- $this->text('0');
- } else {
-
- $this->text('1');
- }
- }
- }
|