From a993f5cafa84c57526aab23b73372da3298a4cbb Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 24 Feb 2016 11:09:12 +0100 Subject: [PATCH] SyncRun: new object to track sync history --- library/Director/Objects/SyncRun.php | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 library/Director/Objects/SyncRun.php diff --git a/library/Director/Objects/SyncRun.php b/library/Director/Objects/SyncRun.php new file mode 100644 index 00000000..a34cb79a --- /dev/null +++ b/library/Director/Objects/SyncRun.php @@ -0,0 +1,41 @@ + null, + 'rule_id' => null, + 'rule_name' => null, + 'start_time' => null, + 'duration_ms' => null, + 'objects_created' => null, + 'objects_deleted' => null, + 'objects_modified' => null, + 'first_related_activity' => null, + 'last_related_activity' => null, + ); + + public static function start(SyncRule $rule) + { + return static::create( + array( + 'start_time' => date('Y-m-d H:i:s'), + 'rule_id' => $rule->id, + 'rule_name' => $rule->rule_name, + ), + $rule->getConnection() + ); + } +}