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

add retry to webhook calls #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

darshanime
Copy link

issue #7 talks about adding retries for webhook calls.

@shark-h shark-h requested a review from sidmutha May 16, 2018 09:19
@ecthiender ecthiender requested a review from 0x777 May 16, 2018 09:23
@sidmutha
Copy link
Contributor

Has this been tested? Also, is it possible to write a test for this? @0x777 ?

@darshanime
Copy link
Author

currently the tests assume skor is running and check for the responses on a local webserver. We can use that setup to test for the retries. Will add a test 👍

@0x777
Copy link
Member

0x777 commented May 18, 2018

Hi !
Thanks for the PR. Can you explain the scenarios in which this retry logic is useful?

@darshanime
Copy link
Author

This retry can be useful if the webhook was not able to accept the payload due to a temporary network glitch etc. Doing a blunt retry will make sure we don't lose calls due to this reason

@@ -20,6 +21,8 @@ struct curl_fetch_st {
size_t size;
};

const int WEBHOOK_RETRY = 5;
Copy link
Member

Choose a reason for hiding this comment

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

MAX_WEBHOOK_RETRIES?

Copy link
Member

Choose a reason for hiding this comment

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

Also should this be taken as an argument from command line?

Choose a reason for hiding this comment

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

Why not waiting for client to send ack ?

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.

4 participants