Skip to content

Commit

Permalink
Revert "Update on_success docstring (close #358)"
Browse files Browse the repository at this point in the history
This reverts commit 70b30f9.
  • Loading branch information
Jack-Keene authored Aug 23, 2024
1 parent 70b30f9 commit d3318d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions snowplow_tracker/emitter_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ def __init__(
:param batch_size: The maximum number of queued events before the buffer is flushed. Default is 10.
:type batch_size: int | None
:param on_success: Callback executed after every HTTP request in a flush has status code 200
Gets passed one argument, an array of dictionaries corresponding to the sent events' payloads
Gets passed the number of events flushed.
:type on_success: function | None
:param on_failure: Callback executed if at least one HTTP request in a flush has status code other than 200
Gets passed two arguments:
1) The number of events which were successfully sent
2) An array of dictionaries corresponding to the unsent events' payloads
2) If method is "post": The unsent data in string form;
If method is "get": An array of dictionaries corresponding to the unsent events' payloads
:type on_failure: function | None
:param byte_limit: The size event list after reaching which queued events will be flushed
:type byte_limit: int | None
Expand Down Expand Up @@ -104,7 +105,8 @@ def on_failure(self) -> Optional[FailureCallback]:
Callback executed if at least one HTTP request in a flush has status code other than 200
Gets passed two arguments:
1) The number of events which were successfully sent
2) An array of dictionaries corresponding to the unsent events' payloads
2) If method is "post": The unsent data in string form;
If method is "get": An array of dictionaries corresponding to the unsent events' payloads
"""
return self._on_failure

Expand Down
10 changes: 6 additions & 4 deletions snowplow_tracker/emitters.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,13 @@ def __init__(
:param batch_size: The maximum number of queued events before the buffer is flushed. Default is 10.
:type batch_size: int | None
:param on_success: Callback executed after every HTTP request in a flush has status code 200
Gets passed one argument, an array of dictionaries corresponding to the sent events' payloads
Gets passed the number of events flushed.
:type on_success: function | None
:param on_failure: Callback executed if at least one HTTP request in a flush has status code other than 200
Gets passed two arguments:
1) The number of events which were successfully sent
2) An array of dictionaries corresponding to the unsent events' payloads
2) If method is "post": The unsent data in string form;
If method is "get": An array of dictionaries corresponding to the unsent events' payloads
:type on_failure: function | None
:param byte_limit: The size event list after reaching which queued events will be flushed
:type byte_limit: int | None
Expand Down Expand Up @@ -462,12 +463,13 @@ def __init__(
:param batch_size: The maximum number of queued events before the buffer is flushed. Default is 10.
:type batch_size: int | None
:param on_success: Callback executed after every HTTP request in a flush has status code 200
Gets passed one argument, an array of dictionaries corresponding to the sent events' payloads
Gets passed the number of events flushed.
:type on_success: function | None
:param on_failure: Callback executed if at least one HTTP request in a flush has status code other than 200
Gets passed two arguments:
1) The number of events which were successfully sent
2) An array of dictionaries corresponding to the unsent events' payloads
2) If method is "post": The unsent data in string form;
If method is "get": An array of dictionaries corresponding to the unsent events' payloads
:type on_failure: function | None
:param thread_count: Number of worker threads to use for HTTP requests
:type thread_count: int
Expand Down

0 comments on commit d3318d3

Please sign in to comment.