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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy