Page MenuHomeSoftware Heritage

config: use already loaded swh config, if any, when instantiating an Indexer
ClosedPublic

Authored by douardda on Feb 15 2019, 5:19 PM.

Details

Summary

with swh-scheduler >= 0.0.47 we have a swh.scheduler.CONFIG that holds the
current swh configuration. Using this prevent us from reloading the config
files on each task execution.

Diff Detail

Repository
rDCIDX Object indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.Feb 15 2019, 5:19 PM

I don't see any variable named CONFIG in swh.scheduler outside of swh/scheduler/celery_backend/config.py.

And I don't like the name SWH_CONFIG, it's not consistent with the name in swh.scheduler (CONFIG), and doesn't tell this config is for the scheduler.

I don't see any variable named CONFIG in swh.scheduler outside of swh/scheduler/celery_backend/config.py.

And I don't like the name SWH_CONFIG, it's not consistent with the name in swh.scheduler (CONFIG), and doesn't tell this config is for the scheduler.

I think you need D1147 to make sense of it here.

ardumont accepted this revision.Feb 20 2019, 5:57 PM
This revision is now accepted and ready to land.Feb 20 2019, 5:57 PM
This revision was automatically updated to reflect the committed changes.