Skip to content

Commit 494d29c

Browse files
author
Naor Livne
committed
adding post updates to cronjob and apps via sdk
1 parent 9b24792 commit 494d29c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/sdk/python.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ connection.restart_app("app_name")
8181
# update app
8282
connection.update_app("app_name", app_conf)
8383

84+
# update app force all params - will reset all params to default values if not declared and raise an error for params
85+
# that are required but not given, similar to the POST update of the API
86+
connection.update_app("app_name", app_conf, force_all=True)
87+
8488
# prune images on all device groups
8589
connection.prune_images()
8690

@@ -171,6 +175,14 @@ connection.create_cron_job("cron_job_name", cron_job_config)
171175
cron_job_config = {
172176
"schedule": "5 * * * *"
173177
}
174-
connection.create_cron_job("cron_job_name", cron_job_config)
178+
connection.update_cron_job("cron_job_name", cron_job_config)
179+
180+
# update a cron job force all params - will reset all params to default values if not declared and raise an error for
181+
# params that are required but not given, similar to the POST update of the API
182+
cron_job_config = {
183+
"schedule": "5 * * * *",
184+
"docker_image" : "nginx"
185+
}
186+
connection.update_cron_job("cron_job_name", cron_job_config, force_all=True)
175187

176188
```

0 commit comments

Comments
 (0)