mirror of
https://github.com/wallabag/wallabag.git
synced 2024-06-23 15:40:48 +00:00
Using an abstract method allow to share code but also can be used it we add a new broker in the future
30 lines
574 B
PHP
30 lines
574 B
PHP
<?php
|
|
|
|
namespace Wallabag\ImportBundle\Consumer;
|
|
|
|
use Simpleue\Job\Job;
|
|
|
|
class RedisEntryConsumer extends AbstractConsumer implements Job
|
|
{
|
|
/**
|
|
* Handle one message by one message.
|
|
*
|
|
* @param string $job Content of the message (directly from Redis)
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function manage($job)
|
|
{
|
|
return $this->handleMessage($job);
|
|
}
|
|
|
|
/**
|
|
* Should tell if the given job will kill the worker.
|
|
* We don't want to stop it :).
|
|
*/
|
|
public function isStopJob($job)
|
|
{
|
|
return false;
|
|
}
|
|
}
|