Releases: RichardKnop/machinery
Ack Task After Processing
Tasks should be acked AFTER processing not before. This was fixed before but reverted by mistake.
See here: https://www.rabbitmq.com/confirms.html
Delivered tasks will be re-queued in case worker connection is lost. But otherwise ack should be sent after task is processed, not in advance.
Redis Delayed Task Gix
Delayed tasks with other than default queue as routing key did not work with Redis broker as once delayed task was fetched from the delayed_tasks queue, it was processed by the current worker process instead of being published to a proper queue (which might be different than current worker instance).
Config Creation Refactoring
Refactored and simplified config creation methods. Do not store config in internal variable anymore (was causing issues with multi config setups).
Add a non blocking LaunchAsync method to worker
Added a non blocking LaunchAsync method to worker struct as alternative to blocking Launch.
Improved Ctrl+C Handling
First Ctrl+C starts graceful shutdown (i.e. wait for running tasks to finish before shutting down). Second Ctrl+C will just abruptly end the program without waiting for tasks.
Wait For Tasks To Finish When Quitting
When there are running tasks and you call worker.Quit() method, the process will wait for all running tasks to be processed first before shutting down.
Updated Dependencies
Updated dep cli tool and all vendored dependencies.
Travis CI gometalinter bugfix
Fixed gometalinter issue on Travis CI so builds now pass successfully. Usage of native go tool vet is enforced now via gometalinter.json config file.
Return Arguments Are Now Appended To Success Callbacks
When a task has OnSuccess callback, the returned arguments are appended to the callback task instead of prepended.
MongoDB Backend Improvement
Small MongoDB Backend Improvement to allow storing task results as bson.Json.