python-pq 0.6.1__tar.gz → 0.6.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_pq-0.6.1 → python_pq-0.6.3}/PKG-INFO +1 -1
- {python_pq-0.6.1 → python_pq-0.6.3}/pyproject.toml +1 -1
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/__init__.py +1 -1
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/client.py +5 -3
- {python_pq-0.6.1 → python_pq-0.6.3}/LICENSE +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/README.md +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/config.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/logging.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/README +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/__init__.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/env.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/script.py.mako +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/versions/20260109T055839Z_476683af098d_initial_schema.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/versions/20260109T063747Z_2483bec70083_add_client_id.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/versions/20260205T120000Z_a1b2c3d4e5f6_add_max_concurrent.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/versions/20260205T180000Z_b7c8d9e0f1a2_add_periodic_key.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/versions/20260217T120000Z_c3d4e5f6a7b8_add_periodic_active.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/migrations/versions/__init__.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/models.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/priority.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/registry.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/serialization.py +0 -0
- {python_pq-0.6.1 → python_pq-0.6.3}/src/pq/worker.py +0 -0
|
@@ -352,17 +352,19 @@ class PQ:
|
|
|
352
352
|
result = session.execute(stmt)
|
|
353
353
|
return result.rowcount > 0
|
|
354
354
|
|
|
355
|
-
def unschedule(self, task: Callable[..., Any], *, key: str = "") -> bool:
|
|
355
|
+
def unschedule(self, task: Callable[..., Any] | str, *, key: str = "") -> bool:
|
|
356
356
|
"""Remove a periodic task.
|
|
357
357
|
|
|
358
358
|
Args:
|
|
359
|
-
task: The scheduled function to remove
|
|
359
|
+
task: The scheduled function to remove, or its import path
|
|
360
|
+
as a 'module:name' string (useful when the module has
|
|
361
|
+
been removed and the callable is no longer importable).
|
|
360
362
|
key: Discriminator key. Defaults to "" (the default schedule).
|
|
361
363
|
|
|
362
364
|
Returns:
|
|
363
365
|
True if task was found and deleted, False otherwise.
|
|
364
366
|
"""
|
|
365
|
-
name = get_function_path(task)
|
|
367
|
+
name = task if isinstance(task, str) else get_function_path(task)
|
|
366
368
|
with self.session() as session:
|
|
367
369
|
stmt = delete(Periodic).where(Periodic.name == name, Periodic.key == key)
|
|
368
370
|
result = session.execute(stmt)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|