Skip to content

Commit 70b30f9

Browse files
authored
Update on_success docstring (close #358)
PR #359 * Update `on_success` docstring
1 parent cb7e434 commit 70b30f9

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

snowplow_tracker/emitter_configuration.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@ def __init__(
3939
:param batch_size: The maximum number of queued events before the buffer is flushed. Default is 10.
4040
:type batch_size: int | None
4141
:param on_success: Callback executed after every HTTP request in a flush has status code 200
42-
Gets passed the number of events flushed.
42+
Gets passed one argument, an array of dictionaries corresponding to the sent events' payloads
4343
:type on_success: function | None
4444
:param on_failure: Callback executed if at least one HTTP request in a flush has status code other than 200
4545
Gets passed two arguments:
4646
1) The number of events which were successfully sent
47-
2) If method is "post": The unsent data in string form;
48-
If method is "get": An array of dictionaries corresponding to the unsent events' payloads
47+
2) An array of dictionaries corresponding to the unsent events' payloads
4948
:type on_failure: function | None
5049
:param byte_limit: The size event list after reaching which queued events will be flushed
5150
:type byte_limit: int | None
@@ -105,8 +104,7 @@ def on_failure(self) -> Optional[FailureCallback]:
105104
Callback executed if at least one HTTP request in a flush has status code other than 200
106105
Gets passed two arguments:
107106
1) The number of events which were successfully sent
108-
2) If method is "post": The unsent data in string form;
109-
If method is "get": An array of dictionaries corresponding to the unsent events' payloads
107+
2) An array of dictionaries corresponding to the unsent events' payloads
110108
"""
111109
return self._on_failure
112110

snowplow_tracker/emitters.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,12 @@ def __init__(
8383
:param batch_size: The maximum number of queued events before the buffer is flushed. Default is 10.
8484
:type batch_size: int | None
8585
:param on_success: Callback executed after every HTTP request in a flush has status code 200
86-
Gets passed the number of events flushed.
86+
Gets passed one argument, an array of dictionaries corresponding to the sent events' payloads
8787
:type on_success: function | None
8888
:param on_failure: Callback executed if at least one HTTP request in a flush has status code other than 200
8989
Gets passed two arguments:
9090
1) The number of events which were successfully sent
91-
2) If method is "post": The unsent data in string form;
92-
If method is "get": An array of dictionaries corresponding to the unsent events' payloads
91+
2) An array of dictionaries corresponding to the unsent events' payloads
9392
:type on_failure: function | None
9493
:param byte_limit: The size event list after reaching which queued events will be flushed
9594
:type byte_limit: int | None
@@ -463,13 +462,12 @@ def __init__(
463462
:param batch_size: The maximum number of queued events before the buffer is flushed. Default is 10.
464463
:type batch_size: int | None
465464
:param on_success: Callback executed after every HTTP request in a flush has status code 200
466-
Gets passed the number of events flushed.
465+
Gets passed one argument, an array of dictionaries corresponding to the sent events' payloads
467466
:type on_success: function | None
468467
:param on_failure: Callback executed if at least one HTTP request in a flush has status code other than 200
469468
Gets passed two arguments:
470469
1) The number of events which were successfully sent
471-
2) If method is "post": The unsent data in string form;
472-
If method is "get": An array of dictionaries corresponding to the unsent events' payloads
470+
2) An array of dictionaries corresponding to the unsent events' payloads
473471
:type on_failure: function | None
474472
:param thread_count: Number of worker threads to use for HTTP requests
475473
:type thread_count: int

0 commit comments

Comments
 (0)