From b11d31ef23c5dfee6bfa54afbec47fc8b8bab7b1 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 13 May 2018 15:30:23 +0300 Subject: 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. --- ick_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ick_controller.py') 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']) -- cgit v1.2.1