Pass the DataStoreInterface implementation into the scheduler rather than using a singleton
Context
Using a singleton is problematic since it means that only one data store can be used per-process. This is obviously incompatible with our configuration allowing multiple instances to be defined in a single config file, and also creates issues with order of execution in the test suite. Since its only needed by the Scheduler
and Job
classes, we may as well just pass it into the Scheduler
.
Task Description
-
Allow the data store to be configured similarly to e.g. CAS or AC -
Replace the DataStore
singleton with an attribute in theScheduler
class -
Pass the data store into the Job
class in places where it is needed
Acceptance Criteria
The DataStore
singleton is gone.
Edited by Adam Coldrick