Changes
3 changed files (+12/-9)
-
-
@@ -6,6 +6,7 @@// // SPDX-License-Identifier: MPL-2.0 using Config; using GLib; namespace TimeTracker {
-
@@ -21,7 +22,7 @@ namespace TimeTracker {File.new_build_filename(Environment.get_user_data_dir(), "timetracker") ); } catch (Error error) { critical(@"Failed to init storage: $(error.message)"); log(APP_ID, LEVEL_CRITICAL, @"Failed to init storage: $(error.message)"); return; }
-
-
-
@@ -6,6 +6,7 @@// // SPDX-License-Identifier: MPL-2.0 using Config; using GLib; namespace TimeTracker.Model {
-
@@ -30,7 +31,7 @@ namespace TimeTracker.Model {var events = storage.load(); var load_seconds = timer.elapsed(); debug("Loading events from storage took %.4f seconds.".printf(load_seconds)); log(APP_ID, LEVEL_DEBUG, "Loading events from storage took %.4f seconds.".printf(load_seconds)); foreach (var event in events) { update_internal(event);
-
@@ -38,9 +39,9 @@ namespace TimeTracker.Model {timer.stop(); var apply_seconds = timer.elapsed() - load_seconds; debug("Applying events took %.4f seconds.".printf(apply_seconds)); log(APP_ID, LEVEL_DEBUG, "Applying events took %.4f seconds.".printf(apply_seconds)); } catch (Error error) { log(null, LEVEL_ERROR, @"Loading of events failed: $(error.message)"); log(APP_ID, LEVEL_ERROR, @"Loading of events failed: $(error.message)"); } } }
-
@@ -53,7 +54,7 @@ namespace TimeTracker.Model {try { storage.save.end(res); } catch (Error error) { critical(@"Save failed: $(error.message)"); log(APP_ID, LEVEL_CRITICAL, @"Save failed: $(error.message)"); } }); }
-
@@ -129,7 +130,7 @@ namespace TimeTracker.Model {return; } info(@"Unknown event found: id=$(event.event_id)"); log(APP_ID, LEVEL_INFO, @"Unknown event found: id=$(event.event_id)"); } } }
-
-
-
@@ -6,6 +6,7 @@// // SPDX-License-Identifier: MPL-2.0 using Config; using GLib; namespace TimeTracker.Storage {
-
@@ -32,7 +33,7 @@ namespace TimeTracker.Storage {throw error; } info(@"Initialized data directory at $(dir.get_parse_name())"); log(APP_ID, LEVEL_INFO, @"Initialized data directory at $(dir.get_parse_name())"); } LocalManifest manifest;
-
@@ -46,7 +47,7 @@ namespace TimeTracker.Storage {manifest = new LocalManifest(); write_manifest(manifest_file, manifest); info(@"Created manifest file at $(manifest_file.get_parse_name())"); log(APP_ID, LEVEL_INFO, @"Created manifest file at $(manifest_file.get_parse_name())"); } var events_dir = dir.get_child(manifest.events_dir);
-
@@ -57,7 +58,7 @@ namespace TimeTracker.Storage {throw error; } info(@"Initialized events directory at $(events_dir.get_parse_name())"); log(APP_ID, LEVEL_INFO, @"Initialized events directory at $(events_dir.get_parse_name())"); } var storage = new Local() {
-