Skip to content

Commit

Permalink
feat(queue): add getRateLimitTtl method [python] (#2340)
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored Dec 18, 2023
1 parent 1ef6bcf commit f0a1f70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions docs/gitbook/python/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
### Feature
* **job:** Add isFailed method [python] ([#2333](https://github.com/taskforcesh/bullmq/issues/2333)) ([`19bfccc`](https://github.com/taskforcesh/bullmq/commit/19bfccc2d7734b150a5fbb6ea720fcd9887c9dd3))

### Fix
* **flows:** Update constructor and methods to match queue base ([#2324](https://github.com/taskforcesh/bullmq/issues/2324)) ([`d6c2064`](https://github.com/taskforcesh/bullmq/commit/d6c2064b1fdd88bd4cc61e049ce055ff620b0062))

## v1.21.0 (2023-12-14)
### Feature
* **job:** Add isCompleted method [python] ([#2331](https://github.com/taskforcesh/bullmq/issues/2331)) ([`364f0c1`](https://github.com/taskforcesh/bullmq/commit/364f0c1f2d4247d2b24041ab9ece0e429110d454))
Expand Down
6 changes: 6 additions & 0 deletions python/bullmq/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ async def isPaused(self):
paused_key_exists = await self.client.hexists(self.keys["meta"], "paused")
return paused_key_exists == 1

def getRateLimitTtl(self):
"""
Returns the time to live for a rate limited key in milliseconds.
"""
return self.client.pttl(self.keys["limiter"])

async def obliterate(self, force: bool = False):
"""
Completely destroys the queue and all of its contents irreversibly.
Expand Down

0 comments on commit f0a1f70

Please sign in to comment.