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

max-concurrency hook property support #165

Closed
wants to merge 2 commits into from
Closed

max-concurrency hook property support #165

wants to merge 2 commits into from

Conversation

ivanpesin
Copy link
Contributor

I have implemented support for hook concurrency limits (issue #148):

   {
     "id": "sleep",
     "execute-command": "/tmp/sleep-test.bsh",
     "command-working-directory": "/tmp",
     "include-command-output-in-response": true,
     "max-concurrency": 2
   }

When the limit is reached, webhook will return 429 Too Many Requests error and show error message:

[webhook] 2017/08/26 11:02:43 sleep got matched
[webhook] 2017/08/26 11:02:43 reached concurrency limit for: sleep (max=2)
[webhook] 2017/08/26 11:02:43 429 | 114.527µs | localhost:9000 | GET /hooks/sleep 

Let me know if you want it to be implemented differently.

@ivanpesin ivanpesin changed the base branch from master to development August 26, 2017 15:45
@ivanpesin ivanpesin closed this Aug 28, 2017
@ivanpesin ivanpesin deleted the max-concurrency branch August 28, 2017 00:03
@ivanpesin
Copy link
Contributor Author

I've based it off master mistakingly, removed this PR and created a new against development -- #167

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