Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tsm-orchestration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UFZ TSM
tsm-orchestration
Commits
ae02c827
Commit
ae02c827
authored
2 weeks ago
by
Florian Gransee
Browse files
Options
Downloads
Patches
Plain Diff
black
parent
a3924f43
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!293
509 tsytsems sync as a service
Pipeline
#499667
passed
2 weeks ago
Stage: check
Stage: integration
Stage: end-to-end
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mqtt_sync_wrapper.py
+1
-3
1 addition, 3 deletions
src/mqtt_sync_wrapper.py
src/setup_crontab.py
+1
-1
1 addition, 1 deletion
src/setup_crontab.py
src/timeio/ext_api.py
+1
-0
1 addition, 0 deletions
src/timeio/ext_api.py
with
3 additions
and
4 deletions
src/mqtt_sync_wrapper.py
+
1
−
3
View file @
ae02c827
...
...
@@ -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__
"
:
...
...
This diff is collapsed.
Click to expand it.
src/setup_crontab.py
+
1
−
1
View file @
ae02c827
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/timeio/ext_api.py
+
1
−
0
View file @
ae02c827
...
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment