climate-ref-celery 0.5.5__py3-none-any.whl → 0.6.1__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.
- climate_ref_celery/app.py +5 -10
- {climate_ref_celery-0.5.5.dist-info → climate_ref_celery-0.6.1.dist-info}/METADATA +2 -1
- {climate_ref_celery-0.5.5.dist-info → climate_ref_celery-0.6.1.dist-info}/RECORD +7 -7
- {climate_ref_celery-0.5.5.dist-info → climate_ref_celery-0.6.1.dist-info}/WHEEL +0 -0
- {climate_ref_celery-0.5.5.dist-info → climate_ref_celery-0.6.1.dist-info}/entry_points.txt +0 -0
- {climate_ref_celery-0.5.5.dist-info → climate_ref_celery-0.6.1.dist-info}/licenses/LICENCE +0 -0
- {climate_ref_celery-0.5.5.dist-info → climate_ref_celery-0.6.1.dist-info}/licenses/NOTICE +0 -0
climate_ref_celery/app.py
CHANGED
|
@@ -11,7 +11,7 @@ from loguru import logger
|
|
|
11
11
|
from rich.pretty import pretty_repr
|
|
12
12
|
|
|
13
13
|
from climate_ref.config import Config
|
|
14
|
-
from climate_ref_core.logging import
|
|
14
|
+
from climate_ref_core.logging import initialise_logging
|
|
15
15
|
|
|
16
16
|
os.environ.setdefault("CELERY_CONFIG_MODULE", "climate_ref_celery.celeryconf.dev")
|
|
17
17
|
|
|
@@ -33,16 +33,11 @@ def create_celery_app(name: str) -> Celery:
|
|
|
33
33
|
@setup_logging.connect
|
|
34
34
|
def setup_logging_handler(loglevel: int, **kwargs: Any) -> None: # pragma: no cover
|
|
35
35
|
"""Set up logging for the Celery worker using the celery signal"""
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
msg_format = (
|
|
40
|
-
"<green>{time:YYYY-MM-DD HH:mm:ss.SSS Z}</green> | <level>{level: <8}</level> | {process.name} | "
|
|
41
|
-
"<cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> - <level>{message}</level>"
|
|
42
|
-
)
|
|
36
|
+
# We ignore the format passed by Celery instead using our own configuration
|
|
37
|
+
config = Config.default()
|
|
38
|
+
msg_format = config.log_format
|
|
43
39
|
|
|
44
|
-
|
|
45
|
-
add_log_handler(level=loglevel, format=msg_format, colorize=True)
|
|
40
|
+
initialise_logging(level=loglevel, format=msg_format, log_directory=config.paths.log)
|
|
46
41
|
|
|
47
42
|
|
|
48
43
|
@worker_ready.connect
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: climate-ref-celery
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: Celery app for mananging tasks and workers
|
|
5
5
|
Author-email: Jared Lewis <jared.lewis@climate-resource.com>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
6
7
|
License-File: LICENCE
|
|
7
8
|
License-File: NOTICE
|
|
8
9
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
climate_ref_celery/__init__.py,sha256=f-dS4JxMLmTCobZtftGDi6bUbtYCv_9iWqxSpC74tWw,129
|
|
2
|
-
climate_ref_celery/app.py,sha256=
|
|
2
|
+
climate_ref_celery/app.py,sha256=KtDX8-6cye9RzJL5rXbJH1Us_pGYONawYAkOnxTcBmI,1527
|
|
3
3
|
climate_ref_celery/cli.py,sha256=ZQ86XdrBZoBVmgV7WCFp_P6LNCT1hFfM0zXahkK0p-E,3196
|
|
4
4
|
climate_ref_celery/executor.py,sha256=Qsx1bvM_-H3eMeg5VsJAV6ghHuGK3WnYyIRAd0-1DG4,4764
|
|
5
5
|
climate_ref_celery/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -9,9 +9,9 @@ climate_ref_celery/celeryconf/__init__.py,sha256=xKcHhnECGZAxrjnMtfaPBU_vgqwRbRL
|
|
|
9
9
|
climate_ref_celery/celeryconf/base.py,sha256=uXaz9S_1hCdwKpvyWBDWE69YVIXHD3Ar7egNKLk9Gx8,484
|
|
10
10
|
climate_ref_celery/celeryconf/dev.py,sha256=um7hvEhlTBfwey9ler_vAHAln_DrpqAP3fbbO2wdmUQ,217
|
|
11
11
|
climate_ref_celery/celeryconf/prod.py,sha256=HyGTfwTZD8MjIkfkb3qyfzjjTPE9sKAoXNq3fJDFO9Q,231
|
|
12
|
-
climate_ref_celery-0.
|
|
13
|
-
climate_ref_celery-0.
|
|
14
|
-
climate_ref_celery-0.
|
|
15
|
-
climate_ref_celery-0.
|
|
16
|
-
climate_ref_celery-0.
|
|
17
|
-
climate_ref_celery-0.
|
|
12
|
+
climate_ref_celery-0.6.1.dist-info/METADATA,sha256=mjhMY2EWr_pWFiPN4bx9TX1Lr3OG3aV7P8Z8Ik9H0Bg,3693
|
|
13
|
+
climate_ref_celery-0.6.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
+
climate_ref_celery-0.6.1.dist-info/entry_points.txt,sha256=U9b-T6EpLV3ZXmHUpEzp8x5TZnCjQ1ynncIkFMwDuPE,58
|
|
15
|
+
climate_ref_celery-0.6.1.dist-info/licenses/LICENCE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
16
|
+
climate_ref_celery-0.6.1.dist-info/licenses/NOTICE,sha256=4qTlax9aX2-mswYJuVrLqJ9jK1IkN5kSBqfVvYLF3Ws,128
|
|
17
|
+
climate_ref_celery-0.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|