amqp-queue
v1.2.4
Published
Amqp job queue with job status query over Redis
Downloads
26
Readme
Use redis store job status, and the data is only used to monitor the job, Use amqp protocol to route/persistant message
- On queue setup, it will subscribe the complete/error/progress queue
- When saving a job, it will be published to "main" queue, and also save to redis with inactive status,
- During the process of the job, redis job status will be updated to active status
- If a job is complete, it will be published to the complete queue, which cause the invoke of on "complete" handler
- After complete handler invoked, the job is done
- If a job failed, it will be published to the error queue, and trigger the on "error" handler
- Error handler will update job status on redis
- Progress will be both saved to redis and published to progress queue, the on "progress" handler will be triggered then.
- Light weight mode can be specified for a job by provide {lightweight: true} as third parameter when creating a job. In this mode, the job does not report any status to redis or queue, which means it is not monitorable.