2016-09-03 15:36:57 +00:00
|
|
|
<?php
|
|
|
|
|
2016-09-09 19:02:03 +00:00
|
|
|
namespace Wallabag\ImportBundle\Consumer;
|
2016-09-03 15:36:57 +00:00
|
|
|
|
2016-09-09 19:02:03 +00:00
|
|
|
use Simpleue\Job\Job;
|
2016-09-03 15:36:57 +00:00
|
|
|
|
2016-09-11 18:23:17 +00:00
|
|
|
class RedisEntryConsumer extends AbstractConsumer implements Job
|
2016-09-03 15:36:57 +00:00
|
|
|
{
|
|
|
|
/**
|
2016-09-09 19:02:03 +00:00
|
|
|
* Handle one message by one message.
|
|
|
|
*
|
|
|
|
* @param string $job Content of the message (directly from Redis)
|
|
|
|
*
|
|
|
|
* @return bool
|
2016-09-03 15:36:57 +00:00
|
|
|
*/
|
2016-09-09 19:02:03 +00:00
|
|
|
public function manage($job)
|
2016-09-03 15:36:57 +00:00
|
|
|
{
|
2016-09-11 18:23:17 +00:00
|
|
|
return $this->handleMessage($job);
|
2016-09-09 19:02:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Should tell if the given job will kill the worker.
|
|
|
|
* We don't want to stop it :).
|
|
|
|
*/
|
|
|
|
public function isStopJob($job)
|
|
|
|
{
|
|
|
|
return false;
|
2016-09-03 15:36:57 +00:00
|
|
|
}
|
|
|
|
}
|