0

Is it possible to assign multiple job to same worker ?

My job work callback is non-blocking. So I can process multiple jobs using same worker. According to discussion https://groups.google.com/forum/?fromgroups=#!topic/gearman/UyUxjY1VZUg I should be using grab_job API from gearman. But I can't find any relative function in libgearman API doc. http://gearman.info/libgearman/index.html

Can you please help me in finding out how to process multiple job using single worker ?

Some programmer dude
  • 400,186
  • 35
  • 402
  • 621
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186

1 Answers1

0

Gearman protocol doesn't limit the number of jobs a worker grabs. Just by sending multiple GRAB_JOB packets, gearmand will assign jobs to the worker as long as jobs are remaining. But some of client library API may not support such operations. So an easy way is making multiple worker objects in a single process, and loop them by yourself.

Takayuki Sato
  • 1,023
  • 1
  • 14
  • 22