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

Remove delay and not before from enqueue #28

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading