The producer/worker can works only from the command line
This commit is contained in:
parent
b2edaad23d
commit
2579631599
@ -4,6 +4,10 @@ use Pheanstalk\Pheanstalk;
|
||||
|
||||
require __DIR__.'/common.php';
|
||||
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
die('This script can run only from the command line.'.PHP_EOL);
|
||||
}
|
||||
|
||||
$connection = new Pheanstalk(BEANSTALKD_HOST);
|
||||
|
||||
foreach (Model\Feed\get_ids() as $feed_id) {
|
||||
|
@ -4,6 +4,10 @@ use Pheanstalk\Pheanstalk;
|
||||
|
||||
require __DIR__.'/common.php';
|
||||
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
die('This script can run only from the command line.'.PHP_EOL);
|
||||
}
|
||||
|
||||
$connection = new Pheanstalk(BEANSTALKD_HOST);
|
||||
|
||||
while ($job = $connection->reserveFromTube(BEANSTALKD_QUEUE)) {
|
||||
|
Loading…
Reference in New Issue
Block a user