localqueue 0.3.3__py3-none-any.whl → 0.4.0__py3-none-any.whl

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.
localqueue/cli.py CHANGED
@@ -8,6 +8,7 @@ from contextlib import contextmanager
8
8
  from pathlib import Path
9
9
  from typing import Any, Iterator, TYPE_CHECKING
10
10
 
11
+ from . import __version__
11
12
  from .cli_commands import (
12
13
  CommandRegistryContext,
13
14
  register_config_commands,
@@ -75,6 +76,15 @@ def _build_app(typer: Any, yaml: Any, console: Any, err_console: Any) -> Any:
75
76
  queue_app = typer.Typer(no_args_is_help=True)
76
77
  retry_app = typer.Typer(no_args_is_help=True)
77
78
  config_app = typer.Typer(no_args_is_help=True)
79
+
80
+ @app.callback(invoke_without_command=True)
81
+ def root_callback(
82
+ version: bool = typer.Option(False, "--version", help="Show version and exit"),
83
+ ) -> None:
84
+ if version:
85
+ console.print(__version__)
86
+ raise typer.Exit()
87
+
78
88
  command_context = CommandRegistryContext(
79
89
  typer=typer,
80
90
  console=console,
@@ -352,6 +352,8 @@ def process_queue_messages(
352
352
  )
353
353
  )
354
354
  if empty_queue:
355
+ if options.forever and options.block:
356
+ continue
355
357
  return handle_empty_queue(err_console, processed)
356
358
  assert iteration is not None
357
359
  if handle_processed_queue_result(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: localqueue
3
- Version: 0.3.3
3
+ Version: 0.4.0
4
4
  Summary: Durable local queues for Python, with persistent retry state powered by Tenacity.
5
5
  Project-URL: Homepage, https://brunoportis.github.io/localqueue/
6
6
  Project-URL: Documentation, https://brunoportis.github.io/localqueue/
@@ -61,6 +61,8 @@ def send_email(job: dict[str, str]) -> None:
61
61
 
62
62
  Full docs live at [brunoportis.github.io/localqueue](https://brunoportis.github.io/localqueue/). The source docs are in [`docs/`](docs/).
63
63
 
64
+ For development and release workflow details, see [`docs/develop.md`](docs/develop.md).
65
+
64
66
  ## Install
65
67
 
66
68
  ```bash
@@ -1,5 +1,5 @@
1
1
  localqueue/__init__.py,sha256=dYQbs8rWh8hAHO_jZdlsaQTEpksUXRmvHUdj804cVRA,1668
2
- localqueue/cli.py,sha256=7HQ67GscNxhMl0yn77i_HN4b9bYl_wDgoxIuIsHMdPg,9496
2
+ localqueue/cli.py,sha256=58bpOEkvK73NeJzbM05yf0pgNrHexvCROf88PASP8d4,9787
3
3
  localqueue/cli_commands.py,sha256=MbES9GIre6KgV_dd2ludtznlAb-8NL6YHHPnFhG1G00,20245
4
4
  localqueue/cli_support.py,sha256=aB4TjRBKbmlWK4N_lNNRcjQOsWJKtOiaTSRUwORMTcQ,7517
5
5
  localqueue/cli_worker_commands.py,sha256=coizh0Qygys3PEfzReAoYPRvrxrA-eQ56ptDwIwmMmw,11500
@@ -16,15 +16,15 @@ localqueue/retry/stores/lmdb.py,sha256=9PtqiVj4PpFSXimqmjnBEEZ7q0JcqxohR7PamniPx
16
16
  localqueue/retry/stores/memory.py,sha256=COpMwDQTqwrD1wF08mdT7pDGqvmZodfO1zL7zWvTsl4,1550
17
17
  localqueue/retry/stores/sqlite.py,sha256=KAG64lbc7ghohQ5_RiOI6ABhUfoFsS_Wn4S9TgZ0V2I,5657
18
18
  localqueue/services/__init__.py,sha256=KlEJx5ieDIkqVGSS0KB2xevXXSY_rpNqdDcTk9Ww2Gc,64
19
- localqueue/services/queue_worker.py,sha256=bJxMO-StrV7NwkcPqjzG6DNYGaAf3z48XY_f2928DGg,17935
19
+ localqueue/services/queue_worker.py,sha256=IdtVyLZsrKfq6v2oRdCAx2iZwoBbnVMEYNFeRqfEY9A,18018
20
20
  localqueue/stores/__init__.py,sha256=0Ufd2EjoZuBnfetFkkSOd2lH0dyb6j_nlNxDhnypTjQ,355
21
21
  localqueue/stores/_shared.py,sha256=JDeNUlV7mXLllvPGU8VfMkIP2dv7B1EwUNo_UztYdvA,12002
22
22
  localqueue/stores/base.py,sha256=MD_ptO73L_1yqMujzt0YKmvGDNlYtQ0viyx2fk8GKwc,3897
23
23
  localqueue/stores/lmdb.py,sha256=7NKYF7NR_8gKNGgY59jp0vlj4kgPK7yL7si3C0g8pCA,20419
24
24
  localqueue/stores/memory.py,sha256=7I2PL4v4vrrbAiNl0Ls9Q6SU2_apZmlSfXiYuc7uRa0,11365
25
25
  localqueue/stores/sqlite.py,sha256=RCCza2NAABR8FsivGOw3l-dmecq3YRH2FLYerruX4VA,27239
26
- localqueue-0.3.3.dist-info/METADATA,sha256=BzLGbZ7k-IVV4IEjvHuvhr1zcGrNi-RkM6Bmk0-pizk,3408
27
- localqueue-0.3.3.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
28
- localqueue-0.3.3.dist-info/entry_points.txt,sha256=UtW4aZEN4Xi_yb3sFeiAd6k8jQ--1A5acmPs6FAs2JQ,51
29
- localqueue-0.3.3.dist-info/licenses/LICENSE,sha256=WaGG8H1cJIusbf6T862P7oDXMchv9Gy32I--7WwIdsI,1069
30
- localqueue-0.3.3.dist-info/RECORD,,
26
+ localqueue-0.4.0.dist-info/METADATA,sha256=6wshqeUF1VbgVbEDiCCuqaHcijjYCwPLDY9tHfTKLxU,3497
27
+ localqueue-0.4.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
28
+ localqueue-0.4.0.dist-info/entry_points.txt,sha256=UtW4aZEN4Xi_yb3sFeiAd6k8jQ--1A5acmPs6FAs2JQ,51
29
+ localqueue-0.4.0.dist-info/licenses/LICENSE,sha256=WaGG8H1cJIusbf6T862P7oDXMchv9Gy32I--7WwIdsI,1069
30
+ localqueue-0.4.0.dist-info/RECORD,,