Skip to content
Snippets Groups Projects
Commit ae02c827 authored by Florian Gransee's avatar Florian Gransee
Browse files

black

parent a3924f43
No related branches found
No related tags found
1 merge request!293509 tsytsems sync as a service
Pipeline #499667 passed
......@@ -41,9 +41,7 @@ def main(thing_uuid: str):
"datetime_from": datetime_from,
"datetime_to": datetime_to,
}
publish_single(
f"sync_ext_apis/{ext_api_name}", json.dumps(message)
)
publish_single(f"sync_ext_apis/{ext_api_name}", json.dumps(message))
if __name__ == "__main__":
......
......@@ -73,7 +73,7 @@ class CreateThingInCrontabHandler(AbstractHandler):
schedule = cls.get_schedule(interval)
if thing.ext_api.api_type_name == "tsystems":
script = "/scripts/mqtt_sync_wrapper.py"
command =f"python3 {script} {uuid} > $STDOUT 2> $STDERR"
command = f"python3 {script} {uuid} > $STDOUT 2> $STDERR"
else:
script = f"/scripts/sync_{thing.ext_api.api_type_name}_api.py"
target_uri = thing.database.url
......
......@@ -8,6 +8,7 @@ from timeio.mqtt import publish_single
api_base_url = get_envvar("DB_API_BASE_URL")
def write_observations(thing: Thing, parsed_observations: dict):
journal = Journal(f"SYNC_{thing.ext_api.api_type_name}")
resp = requests.post(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment