Skip to content

Commit

Permalink
Added a command line tool to trigger queued messages by a cron job
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Jun 19, 2015
1 parent ace4ad4 commit b4a826f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bin/queue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env php

<?php

/**
* Use as follows:
* $ queue -s <queue_gateway_id> -n <number of messages to be sent>
*
* E.g. to send 15 messages of source queue gateway ID 2, do this:
*
* $ queue -s 2 -n 15
*/

define('TL_MODE', 'FE');
require __DIR__ . '/../../../initialize.php';
$queueManager = $GLOBALS['NOTIFICATION_CENTER']['QUEUE_MANAGER'];

$queueManager->sendFromQueue($argv[2], $argv[4]);

0 comments on commit b4a826f

Please sign in to comment.