-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to fetch Job Object in Perform function #80
Comments
Nope. The job is an internal structure and not available to the worker. What are you trying to do? |
My objective is to send a discord message when my job has 0 retries remaining. In order to do that I thought I would be able to check the retry remaining variable in the job object when it reaches the Perform function. Is there any other way that I can track the number of retries remaining when i receive the args in the perform function so that i can send out an alert to my discord channel to know that the job has exhausted it's retries and has failed ? |
I just need a way to monitor the retry attempts as the job is queued and requeued through code so that i can handle sending of alerts when all retries have been exhausted. Any way to keep track of the retry count would be helpful. |
I recently integrated Faktory into my GO application. I initialized a worker manager with the job type and the Perform function as mentioned below
mgr.Register("TicketGeneration", ReceiveJobs)
In the "ReceiveJobs" function I only get access to the "args". However, I am not able to fetch the "Job". From the context I'm only able to fetch the "Helper" object.
Is there a way that I can use the "Jid" from the helper object to fetch the job object ?
The text was updated successfully, but these errors were encountered: