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
This is given in response to a GRAB_JOB request to give the worker
information needed to run the job. All communication about the
job (such as status updates and completion response) should use
the handle, and the worker should run the given function with
the argument.
Arguments:
**- NULL byte terminated job handle.**
- NULL byte terminated function name.
- Opaque data that is given to the function as an argument.
这里的"handle"不是UUID吗,并且
func (worker *Worker) handleInPack(inpack *inPack) {
switch inpack.dataType {
case dtNoJob:
inpack.a.PreSleep()
case dtNoop:
inpack.a.Grab()
case dtJobAssign, dtJobAssignUniq: go func() {
if err := worker.exec(inpack); err != nil {
worker.err(err)
}
}()
worker是支持并发的啊,是否只是gearman在服务端做了控制,一个连接拉取任务是串行的,即:
请问:
1 worker连续两次grab:
a.Grab()
a.Grab()
获取到一个任务后再也获取不到任务了,为什么,是Job Server限制了吗?
2 worker里面一个agent是不是不支持并发,必须grab到一个任务后,再grab下一个?
3 注册多个AddFunc后,观察发现Job Server是按照注册的反序发送任务的,即必须等后面注册的全部拉空后才能获取到前面注册的任务?
期待您的回答,谢谢!
The text was updated successfully, but these errors were encountered: