grantcarthew / node-rethinkdb-job-queue

A persistent job or task queue backed by RethinkDB.
https://github.com/grantcarthew/node-rethinkdb-job-queue/wiki
MIT License
156 stars 16 forks source link

job getting cancelled #59

Closed crossroads77 closed 7 years ago

crossroads77 commented 7 years ago

Running a job getting cancelled even thought there is not cancellation of job even thought at no place i have passed err.cancelJob or called Queue.cancelJob. It only happens inside docker container otherwise works fine.

`{

"data": {
    "ciprId": "45554" ,
    "invoiceId": "98397" ,
    "invoicePaymentId": "99159"
} ,
"dateCreated": Sat Mar 11 2017 03:55:30 GMT+00:00 ,
"dateEnable": Sat Mar 11 2017 04:00:35 GMT+00:00 ,
"dateFinished": Sat Mar 11 2017 03:55:32 GMT+00:00 ,
"dateStarted": Sat Mar 11 2017 03:55:35 GMT+00:00 ,
"id": "57f31d2a-cab9-4734-8027-0e5916067c50" ,
"log": [
    {
        "data": null ,
        "date": Sat Mar 11 2017 03:55:30 GMT+00:00 ,
        "message": "Job added to the queue" ,
        "processCount": 0 ,
        "queueId": "d5e5677cddf2:jobs:payments:1:45bf900d-82dd-4f49-9664-20ee5120ad04" ,
        "retryCount": 0 ,
        "status": "waiting" ,
        "type": "information"
    } ,
    {
        "date": Sat Mar 11 2017 03:55:35 GMT+00:00 ,
        "message": "Job retrieved and active" ,
        "processCount": 0 ,
        "queueId": "d5e5677cddf2:jobs:payments:1:45bf900d-82dd-4f49-9664-20ee5120ad04" ,
        "retryCount": 0 ,
        "status": "active" ,
        "type": "information"
    } ,
    {
        "date": Sat Mar 11 2017 03:55:32 GMT+00:00 ,
        "processCount": 1 ,
        "queueId": "d5e5677cddf2:jobs:payments:1:45bf900d-82dd-4f49-9664-20ee5120ad04" ,
        "retryCount": 0 ,
        "status": "cancelled" ,
        "type": "information"
    }
] ,
"name": null ,
"priority": 40 ,
"processCount": 1 ,
"progress": 0 ,
"queueId": "d5e5677cddf2:jobs:payments:1:45bf900d-82dd-4f49-9664-20ee5120ad04" ,
"repeat": false ,
"repeatDelay": 300000 ,
"retryCount": 0 ,
"retryDelay": 60000 ,
"retryMax": 5 ,
"status": "cancelled" ,
"timeout": 300000

}`

grantcarthew commented 7 years ago

@crossroads77 There was a logic bug introduced recently. It is fixed in v3.0.1. Please update your local version and try again.

I suspect your job failed processing and raised an error. The bug was seeing the error as a cancel.

Thanks for reporting.

crossroads77 commented 7 years ago

Yes upgrade to v3.0.1 fixed it.

Thanks