SEBA-405 Update exampleservice to use synchronizer library
Change-Id: Icaf8223b4033815826a6aa6086143e3c9b7a8f60
diff --git a/xos/synchronizer/exampleservice-synchronizer.py b/xos/synchronizer/exampleservice-synchronizer.py
index 06fea1b..5e83992 100644
--- a/xos/synchronizer/exampleservice-synchronizer.py
+++ b/xos/synchronizer/exampleservice-synchronizer.py
@@ -18,9 +18,8 @@
# ExampleService Synchronizer. This loads the config file and starts the synchronizer
-import importlib
import os
-import sys
+from xossynchronizer import Synchronizer
from xosconfig import Config
base_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/config.yaml')
@@ -31,9 +30,5 @@
else:
Config.init(base_config_file, 'synchronizer-config-schema.yaml')
-synchronizer_path = os.path.join(os.path.dirname(
- os.path.realpath(__file__)), "../../synchronizers/new_base")
-sys.path.append(synchronizer_path)
-mod = importlib.import_module("xos-synchronizer")
-mod.main()
+Synchronizer().run()