Skip to content

Commit

Permalink
Merge pull request #28 from upstash/enqueue-fix
Browse files Browse the repository at this point in the history
Remove delay and not before from enqueue
  • Loading branch information
CahidArda authored Jul 31, 2024
2 parents 098657d + 5c10fb5 commit d446f70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 44 deletions.
24 changes: 2 additions & 22 deletions qstash/asyncio/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ async def enqueue(
retries: Optional[int] = None,
callback: Optional[str] = None,
failure_callback: Optional[str] = None,
delay: Optional[Union[str, int]] = None,
not_before: Optional[int] = None,
deduplication_id: Optional[str] = None,
content_based_deduplication: Optional[bool] = None,
timeout: Optional[Union[str, int]] = None,
Expand Down Expand Up @@ -234,13 +232,6 @@ async def enqueue(
:param callback: A callback url that will be called after each attempt.
:param failure_callback: A failure callback url that will be called when a delivery
is failed, that is when all the defined retries are exhausted.
:param delay: Delay the message delivery. The format for the delay string is a
number followed by duration abbreviation, like `10s`. Available durations
are `s` (seconds), `m` (minutes), `h` (hours), and `d` (days). As convenience,
it is also possible to specify the delay as an integer, which will be
interpreted as delay in seconds.
:param not_before: Delay the message until a certain time in the future.
The format is a unix timestamp in seconds, based on the UTC timezone.
:param deduplication_id: Id to use while deduplicating messages.
:param content_based_deduplication: Automatically deduplicate messages based on
their content.
Expand All @@ -264,8 +255,8 @@ async def enqueue(
retries=retries,
callback=callback,
failure_callback=failure_callback,
delay=delay,
not_before=not_before,
delay=None,
not_before=None,
deduplication_id=deduplication_id,
content_based_deduplication=content_based_deduplication,
timeout=timeout,
Expand Down Expand Up @@ -293,8 +284,6 @@ async def enqueue_json(
retries: Optional[int] = None,
callback: Optional[str] = None,
failure_callback: Optional[str] = None,
delay: Optional[Union[str, int]] = None,
not_before: Optional[int] = None,
deduplication_id: Optional[str] = None,
content_based_deduplication: Optional[bool] = None,
timeout: Optional[Union[str, int]] = None,
Expand Down Expand Up @@ -324,13 +313,6 @@ async def enqueue_json(
:param callback: A callback url that will be called after each attempt.
:param failure_callback: A failure callback url that will be called when a delivery
is failed, that is when all the defined retries are exhausted.
:param delay: Delay the message delivery. The format for the delay string is a
number followed by duration abbreviation, like `10s`. Available durations
are `s` (seconds), `m` (minutes), `h` (hours), and `d` (days). As convenience,
it is also possible to specify the delay as an integer, which will be
interpreted as delay in seconds.
:param not_before: Delay the message until a certain time in the future.
The format is a unix timestamp in seconds, based on the UTC timezone.
:param deduplication_id: Id to use while deduplicating messages.
:param content_based_deduplication: Automatically deduplicate messages based on
their content.
Expand All @@ -351,8 +333,6 @@ async def enqueue_json(
retries=retries,
callback=callback,
failure_callback=failure_callback,
delay=delay,
not_before=not_before,
deduplication_id=deduplication_id,
content_based_deduplication=content_based_deduplication,
timeout=timeout,
Expand Down
24 changes: 2 additions & 22 deletions qstash/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,6 @@ def enqueue(
retries: Optional[int] = None,
callback: Optional[str] = None,
failure_callback: Optional[str] = None,
delay: Optional[Union[str, int]] = None,
not_before: Optional[int] = None,
deduplication_id: Optional[str] = None,
content_based_deduplication: Optional[bool] = None,
timeout: Optional[Union[str, int]] = None,
Expand Down Expand Up @@ -817,13 +815,6 @@ def enqueue(
:param callback: A callback url that will be called after each attempt.
:param failure_callback: A failure callback url that will be called when a delivery
is failed, that is when all the defined retries are exhausted.
:param delay: Delay the message delivery. The format for the delay string is a
number followed by duration abbreviation, like `10s`. Available durations
are `s` (seconds), `m` (minutes), `h` (hours), and `d` (days). As convenience,
it is also possible to specify the delay as an integer, which will be
interpreted as delay in seconds.
:param not_before: Delay the message until a certain time in the future.
The format is a unix timestamp in seconds, based on the UTC timezone.
:param deduplication_id: Id to use while deduplicating messages.
:param content_based_deduplication: Automatically deduplicate messages based on
their content.
Expand All @@ -847,8 +838,8 @@ def enqueue(
retries=retries,
callback=callback,
failure_callback=failure_callback,
delay=delay,
not_before=not_before,
delay=None,
not_before=None,
deduplication_id=deduplication_id,
content_based_deduplication=content_based_deduplication,
timeout=timeout,
Expand Down Expand Up @@ -876,8 +867,6 @@ def enqueue_json(
retries: Optional[int] = None,
callback: Optional[str] = None,
failure_callback: Optional[str] = None,
delay: Optional[Union[str, int]] = None,
not_before: Optional[int] = None,
deduplication_id: Optional[str] = None,
content_based_deduplication: Optional[bool] = None,
timeout: Optional[Union[str, int]] = None,
Expand Down Expand Up @@ -907,13 +896,6 @@ def enqueue_json(
:param callback: A callback url that will be called after each attempt.
:param failure_callback: A failure callback url that will be called when a delivery
is failed, that is when all the defined retries are exhausted.
:param delay: Delay the message delivery. The format for the delay string is a
number followed by duration abbreviation, like `10s`. Available durations
are `s` (seconds), `m` (minutes), `h` (hours), and `d` (days). As convenience,
it is also possible to specify the delay as an integer, which will be
interpreted as delay in seconds.
:param not_before: Delay the message until a certain time in the future.
The format is a unix timestamp in seconds, based on the UTC timezone.
:param deduplication_id: Id to use while deduplicating messages.
:param content_based_deduplication: Automatically deduplicate messages based on
their content.
Expand All @@ -934,8 +916,6 @@ def enqueue_json(
retries=retries,
callback=callback,
failure_callback=failure_callback,
delay=delay,
not_before=not_before,
deduplication_id=deduplication_id,
content_based_deduplication=content_based_deduplication,
timeout=timeout,
Expand Down

0 comments on commit d446f70

Please sign in to comment.