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
I have a question about how to add jobs to a queue in a short living script.
So I have an application that creates the queues using the createQueue method and it also adds the .work method after that and handles the jobs, and here everything works.
Now in another Node Process/script/cron_job which is totally separated from the main app I'm trying to add , Only add jobs to the queues, not wait and handle any. And in that file I just use the createQueue method to start a queue and add jobs to it, I do not use the .work method to handle anything since I want the process node process to finish and not hang and wait for something.
Now unfortunately the process hangs and waits for something.
And from here my question is how to add jobs to a queue in a separate running file/process correctly and not wait for something, since now I guess pg boss once initialized just waits for something.
is it safe to close the short living process with process.exit? or what is the suggestion
The text was updated successfully, but these errors were encountered:
I guess then is my listeners I have 2 listeners on the PGBoss instance like 'on stopped' and 'on error'
I'll try to use a removeAllListeners and guess that will help
I have a question about how to add jobs to a queue in a short living script.
So I have an application that creates the queues using the createQueue method and it also adds the .work method after that and handles the jobs, and here everything works.
Now in another Node Process/script/cron_job which is totally separated from the main app I'm trying to add , Only add jobs to the queues, not wait and handle any. And in that file I just use the
createQueue
method to start a queue and add jobs to it, I do not use the .work method to handle anything since I want the process node process to finish and not hang and wait for something.Now unfortunately the process hangs and waits for something.
And from here my question is how to add jobs to a queue in a separate running file/process correctly and not wait for something, since now I guess pg boss once initialized just waits for something.
is it safe to close the short living process with process.exit? or what is the suggestion
The text was updated successfully, but these errors were encountered: