diff options
author | Lars Wirzenius <liw@exolobe1> | 2018-05-13 15:30:23 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-05-17 21:44:59 +0300 |
commit | b11d31ef23c5dfee6bfa54afbec47fc8b8bab7b1 (patch) | |
tree | 2e6b085f8fb023d53c8ac20a97aef2c7d1c11d4b /ick_controller.py | |
parent | 531dd2c50bfdfcf50bb37f57cf9fc2b69787adcf (diff) | |
download | ick2-b11d31ef23c5dfee6bfa54afbec47fc8b8bab7b1.tar.gz |
Change: how controller stores persistent data
Replace old State class with new FilePersistentState and
TransactionalState classes. Use new Resource class instead of raw
dicts. Use context managers for creating, updating resources, to avoid
mistakes from accidentally not saving changes.
Overall persistence should now be rather simpler. This should open up
a possibility for changing the controller to insert more actions into
the build graph, to trigger notifcations via the workers.
Diffstat (limited to 'ick_controller.py')
-rw-r--r-- | ick_controller.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ick_controller.py b/ick_controller.py index 66f3de1..108a22a 100644 --- a/ick_controller.py +++ b/ick_controller.py @@ -91,8 +91,8 @@ def main(): ick2.log.log('info', msg_text='Ick2 controller starts', config=config) - state = ick2.ControllerState() - state.set_state_directory(config['statedir']) + state = ick2.FilePersistentState() + state.set_directory(config['statedir']) api = ick2.ControllerAPI(state) api.set_artifact_store_url(config['artifact-store']) |