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

Sync/Wait for processing handler #14

Merged
merged 13 commits into from
Aug 16, 2019
Merged

Conversation

toli-belo
Copy link

The job handler may not appear in the client.handlers in time before gearman responds with an update. This change adds a fine-grained polling for the handler to appear before giving up.

@toli-belo toli-belo changed the title Poll for processing handle Sync/Wait for processing handler Aug 14, 2019
)

type HandlerMap struct {
mu sync.Mutex

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be a sync.RWMutex?


handler_map := NewHandlerMap()
var handler ResponseHandler = func(*Response) {
fmt.Printf("test: I got a response \n")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t.Logf

@toli-belo toli-belo merged commit fb8c16d into master Aug 16, 2019
@toli-belo toli-belo deleted the anatolii/increase_handle_delay branch August 16, 2019 17:32
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

Successfully merging this pull request may close these issues.

2 participants