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 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.
func ReceiveJobs(ctx context.Context, args ...interface{}) {
help := worker.HelperFor(ctx)
}
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: