Closed openqubit closed 8 years ago
Also, in the node.js worker: https://github.com/vsivsi/meteor-job-collection-playground-worker/blob/master/work.coffee#L64
You are correct, the code wouldn't work without it.
This code job.done(once(cb, "Done"));
gives Callback called! Done
on the terminal,but when i check in myJobQueue.jobs
collection the job status is still running
instead of done
.
When do you check? The server is not updated instantly when code runs on a client. This is an async system. Again, without the context of an entire running app to look at, I really can't help with this type of thing. It just ends up being a game of 20 questions trying to gather enough information to really help. With all of the code in front of me I can see exactly what you are trying to do.
I check immediately a task is successfully done. Its true,iam using iron cli and router and a couple of other packages. I have a another method of updating the status but its all to hacky. Many thanks.
I have looked at the the playground app and it makes no use of this important function
jobDone(id, runId, result, options)
https://github.com/vsivsi/meteor-job-collection#jobdoneid-runid-result-optionsHow should one use this function to be able to mark a job stored in the mongo jobqueue as complete. My Jobs that have been done successfully are still displaying running in
myJobQueue.jobs
collection.