Skip to content

max-concurrency hook property support#165

Closed
ivanpesin wants to merge 2 commits into
adnanh:developmentfrom
ivanpesin:max-concurrency
Closed

max-concurrency hook property support#165
ivanpesin wants to merge 2 commits into
adnanh:developmentfrom
ivanpesin:max-concurrency

Conversation

@ivanpesin

Copy link
Copy Markdown
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
Copy Markdown
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