climate-ref-celery 0.5.4__py3-none-any.whl → 0.6.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.
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 add_log_handler, capture_logging
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
- capture_logging()
37
-
38
- # Include process name in celery logs
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
- logger.remove()
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,13 +1,15 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: climate-ref-celery
3
- Version: 0.5.4
3
+ Version: 0.6.0
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
- Classifier: Development Status :: 4 - Beta
9
+ Classifier: Development Status :: 3 - Alpha
9
10
  Classifier: Intended Audience :: Developers
10
11
  Classifier: Intended Audience :: Science/Research
12
+ Classifier: License :: OSI Approved :: Apache Software License
11
13
  Classifier: Operating System :: OS Independent
12
14
  Classifier: Programming Language :: Python
13
15
  Classifier: Programming Language :: Python :: 3
@@ -17,7 +19,8 @@ Classifier: Programming Language :: Python :: 3.13
17
19
  Classifier: Topic :: Scientific/Engineering
18
20
  Requires-Python: >=3.11
19
21
  Requires-Dist: celery[redis]>=5.4.0
20
- Requires-Dist: cmip-ref-core
22
+ Requires-Dist: climate-ref
23
+ Requires-Dist: climate-ref-core
21
24
  Requires-Dist: environs>=11
22
25
  Requires-Dist: loguru>=0.7.2
23
26
  Requires-Dist: tqdm>=4.67.1
@@ -1,5 +1,5 @@
1
1
  climate_ref_celery/__init__.py,sha256=f-dS4JxMLmTCobZtftGDi6bUbtYCv_9iWqxSpC74tWw,129
2
- climate_ref_celery/app.py,sha256=wLzAnrpzkwZLYY6HY_riHUEtjiRQpkKDSeKZpyMTxAQ,1694
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.5.4.dist-info/METADATA,sha256=6XvLo2WXQzvXQPbe4C42Z__XFktH9pvILC0vOhYUYuA,3568
13
- climate_ref_celery-0.5.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
- climate_ref_celery-0.5.4.dist-info/entry_points.txt,sha256=U9b-T6EpLV3ZXmHUpEzp8x5TZnCjQ1ynncIkFMwDuPE,58
15
- climate_ref_celery-0.5.4.dist-info/licenses/LICENCE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
- climate_ref_celery-0.5.4.dist-info/licenses/NOTICE,sha256=4qTlax9aX2-mswYJuVrLqJ9jK1IkN5kSBqfVvYLF3Ws,128
17
- climate_ref_celery-0.5.4.dist-info/RECORD,,
12
+ climate_ref_celery-0.6.0.dist-info/METADATA,sha256=ojJp-8i6POwN64iSZYBngMpwqLYwlSZrTZHG3TCVDmk,3693
13
+ climate_ref_celery-0.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
+ climate_ref_celery-0.6.0.dist-info/entry_points.txt,sha256=U9b-T6EpLV3ZXmHUpEzp8x5TZnCjQ1ynncIkFMwDuPE,58
15
+ climate_ref_celery-0.6.0.dist-info/licenses/LICENCE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
+ climate_ref_celery-0.6.0.dist-info/licenses/NOTICE,sha256=4qTlax9aX2-mswYJuVrLqJ9jK1IkN5kSBqfVvYLF3Ws,128
17
+ climate_ref_celery-0.6.0.dist-info/RECORD,,