You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.
I was going through the worker code and the options take a parameter as callback. Looking at the process code, it tries to find the callback for a particular job.data.name. @scttnlsn if you can help explain the use-case of this functionality?
The text was updated successfully, but these errors were encountered:
The worker callbacks are keyed by name and should correspond to the values in job.data.name. The callbacks perform the actual computation/work and by naming the callbacks, a single worker can perform various tasks based on the name of the enqueued job. Does that answer your question?
A job named reverse is enqueued. This sets job.data.name to the string "reverse" in the job document. A worker function is then registered corresponding to the name:
I was going through the worker code and the options take a parameter as callback. Looking at the process code, it tries to find the callback for a particular job.data.name. @scttnlsn if you can help explain the use-case of this functionality?
The text was updated successfully, but these errors were encountered: