Skip to content
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

Should I exec "FASTJOB" or "ACKJOB" after I exec "GETJOB" ? #208

Open
gfYaya opened this issue Jan 12, 2018 · 4 comments
Open

Should I exec "FASTJOB" or "ACKJOB" after I exec "GETJOB" ? #208

gfYaya opened this issue Jan 12, 2018 · 4 comments

Comments

@gfYaya
Copy link

gfYaya commented Jan 12, 2018

I add a job with "ADDJOB" in the disque.
localhost:7711> addjob test "yaya" 10000
the scrreen console that:
D-351c426f-BAZ7uyDERGtv7ybjIz/19a1A-05a1

then I exec the getjob ,I get this job.
I exec the command: qlen
the result returns 0 or empty

Whether I need to exec the "FASTJOB" or "ACKJOB" to GC this channel in disque after I exec "GETJOB"?

@gfYaya
Copy link
Author

gfYaya commented Jan 12, 2018

I need to modify the disque config properties?

@gfYaya
Copy link
Author

gfYaya commented Jan 12, 2018

I try that,I can get the job again.After I exec "ADDJOB" , I exec the "GETJOB" command,in few seconds ,the result of "QLEN" is 0 , after a while , exec "QLEN" ,the result is 1. I use the "ENTRY 10000" param as I exec "ADDJOB",but it doesn't work. I have seen the document several times. Please forgive me that my English is so broken,I really don't know what makes this matter.

@mathieulongtin
Copy link

Your worker should do this:

  • GETJOB
  • Do stuff
  • If job is successfully accomplished: ACKJOB $JID

If you don't call ACKJOB or FASTACK, disque assumes the worker failed, and returns the job to the queue after five minutes. You can change that with the RETRY argument to ADDJOB.

@gfYaya
Copy link
Author

gfYaya commented Jan 19, 2018

@mathieulongtin Thank you for your help .I saw what I need to do , and how to control the jobs of the disque.And I tried this , "ADDJOB $queuename $job 0 RETRY 5",the job will get back quickly.But ,the job recured less then 5 seconds. The intervals are mostly between 1 and 2 seconds. It's really strange....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants