Skip to content

Commit

Permalink
Set docstrings, prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopofar committed Jul 25, 2024
1 parent b47a6fd commit a49a3e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Changelog

## 1.2.0 - 2024-07-23
## 1.2.0 - 2024-07-25

* The `reschedule()` method have an optional parameter to decrease the ttl if set to True (False by default).
* The `add()` and `addMany()` methods set the can_start_at by default to the current time of the database clock for consistency.
* The `reschedule()` method has an optional parameter to decrease the TTL if set to True (False by default).
* The `add()` and `add_many()` methods set the `can_start_at` by default to the current time of the database clock, not Python, for consistency.

## 1.1.0 - 2024-07-01

Expand Down
8 changes: 6 additions & 2 deletions postgrestq/task_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,13 @@ def reschedule(
Workers can use this method to "drop" a work unit in case of
eviction (because of an external issue like terminating a machine
by aws and not because of a failure).
by AWS and not because of a failure).
Rescheduled work units are immediately available for processing again,
and unless decrease_ttl is set to True, the TTL is not modified.
This function can optionally modify the TTL.
This function can optionally modify the TTL, setting decrease_ttl to
True. This allows to handle a failure quickly without waiting the
lease_timeout.
Parameters
----------
Expand Down

0 comments on commit a49a3e2

Please sign in to comment.