2016-05-02 04:03:21 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Pheanstalk\Pheanstalk;
|
|
|
|
|
|
|
|
require __DIR__.'/common.php';
|
|
|
|
|
2016-05-02 04:15:31 +02:00
|
|
|
if (php_sapi_name() !== 'cli') {
|
|
|
|
die('This script can run only from the command line.'.PHP_EOL);
|
|
|
|
}
|
|
|
|
|
2016-05-02 04:03:21 +02:00
|
|
|
$connection = new Pheanstalk(BEANSTALKD_HOST);
|
|
|
|
|
|
|
|
foreach (Model\Feed\get_ids() as $feed_id) {
|
|
|
|
$connection
|
|
|
|
->useTube(BEANSTALKD_QUEUE)
|
|
|
|
->put($feed_id, Pheanstalk::DEFAULT_PRIORITY, Pheanstalk::DEFAULT_DELAY, BEANSTALKD_TTL);
|
|
|
|
}
|