- Added Symfony 4 support
- #16 catch throwables instead of just exceptions
- Dropped support for PHP 5.5 and 5.6
- Dropped support for unmaintained Symfony versions. Supported versions are 2.8, 3.4, 4.1 and up, as per the Symfony Roadmap.
- #9 Ensure that a job retains its priority when it is rescheduled
- #10 Add ability to specify a new priority on rescheduled jobs
- #11 Add ability to set timeout for reservations
- Added Symfony3 support
- Added
worker:peek
command
- Added default ttr configuration
- Added event for buried jobs
- When using Monolog, logs are output to the console automatically
BC breaks from the previous WorkerBundle:
- Renamed the
FM
namespace toTreeHouse
- Removed
QueueManager::setExceptionHandler
andQueueManager::getExceptionHandler
. - The
$time
argument inRescheduleException::create
no longer needs the+
sign. - Actions and executors are now combined in a dictionary. The action methods
(
registerAction()
,hasAction()
andgetActions()
) have therefore been removed from theQueueManager
. - Renamed JobExecutor to Executor:
hasJobExecutor()
=>hasExecutor()
inQueueManager
addJobExecutor()
=>addExecutor()
inQueueManager
getJobExecutor()
=>getExecutor()
inQueueManager
- The
$payload
argument inQueueManager::add()
is now required. - The
$date
argument inQueueManager::add()
andQueueManager::addForObject()
has been replaced by a$delay
argument. - Renamed
QueueManager::get()
toQueueManager::peek()
to better reflect the method that is used. - The
$action
argument inQueueManager::peek()
is now required. - Renamed
QueueManager::executeJob()
toQueueManager::execute()
. - Renamed
QueueManager::process()
toQueueManager::executeJob()
. - Renamed
JobExecutorEvent
toExecutionEvent
. Also instead of theQueueManager
, this event receives an executor and the result after the job has been executed. - Renamed the
Queue
namespace toExecutor
to better reflect the classes in it. All references toJobExecutor
andObjectPayloadInterface
must be updated. - Renamed
JobExecutor
toAbstractExecutor
. - Removed
WorkerEvent
- Renamed constants in WorkerEvents:
PRE_EXECUTE_JOB
toPRE_EXECUTE_ACTION
POST_EXECUTE_JOB
toPOST_EXECUTE_ACTION
- Removed the logging aggregation feature: previously, executors could return a
logger for which the messages would be relayed to the
QueueManager
's logger. With the fine-grained control that Symfony now offers this is no longer needed. All references to theWorkerBundle\Monolog
namespace must be removed. - Executors now need to be tagged with
tree_house.worker.executor
instead offm_worker.queue.job_executor
. - Removed
fm_worker.logger.handler
support - Removed the
WorkerEvents::RUN_TERMINATE
event: use the console termination event instead.
Changes:
- Added ExecutorInterface
- Added configurable payloads
- Added convenience commands
- Listeners to the 'pre-execute' event may change the payload.
- Listeners to the 'post-execute' event may change the result.