Skip to content

Commit 95f2fc3

Browse files
committed
Naming changes
1 parent 507d72f commit 95f2fc3

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

tasktiger/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def _move(self, from_state=None, to_state=None, when=None, mode=None):
345345
)
346346

347347
if to_state == QUEUED:
348-
self.tiger._notify_queue(queue, client=pipeline)
348+
self.tiger._notify_task_queued(queue, client=pipeline)
349349

350350
try:
351351
scripts.execute_pipeline(pipeline)
@@ -422,7 +422,7 @@ def delay(self, when=None, max_queue_size=None):
422422
)
423423

424424
if state == QUEUED:
425-
tiger._notify_queue(self.queue, client=pipeline)
425+
tiger._notify_task_queued(self.queue, client=pipeline)
426426

427427
pipeline.execute()
428428

tasktiger/tasktiger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def _get_current_tasks(self):
265265
current_task = property(_get_current_task)
266266
current_tasks = property(_get_current_tasks)
267267

268-
def _notify_queue(self, queue, client=None):
268+
def _notify_task_queued(self, queue, client=None):
269269
_client = client or self.connection.pipeline(transaction=False)
270270

271271
if self.config["PUBLISH_QUEUED_TASKS"]:
@@ -275,7 +275,7 @@ def _notify_queue(self, queue, client=None):
275275
if cache_token_expiry > 0:
276276
for queue_part in list(dotted_parts(queue)) + [""]:
277277
_client.set(
278-
self._key("queue_cache_token", queue_part),
278+
self._key("queued_cache_token", queue_part),
279279
secrets.token_hex(),
280280
ex=cache_token_expiry,
281281
)

tasktiger/worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def _worker_queue_scheduled_tasks(self) -> None:
223223
# XXX: ideally this would be in the same pipeline, but we only want
224224
# to announce if there was a result.
225225
if result:
226-
self.tiger._notify_queue(queue)
226+
self.tiger._notify_task_queued(queue)
227227
self._did_work = True
228228

229229
def _poll_for_queues(self) -> None:
@@ -263,7 +263,7 @@ def _should_poll_for_queues(self) -> bool:
263263

264264
def _get_queue_cache_tokens(self) -> Tuple[Optional[str], ...]:
265265
keys = sorted(
266-
self._key("queue_cache_token", queue)
266+
self._key("queued_cache_token", queue)
267267
for queue in self.only_queues or [""]
268268
)
269269

0 commit comments

Comments
 (0)