diff options
Diffstat (limited to 'cac')
-rwxr-xr-x | cac | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -13,7 +13,7 @@ cac_resources_cache=${cac_resources_cache-$HOME/tmp/cac_resources_cache.json} cac_servers_cache=${cac_servers_cache-$HOME/tmp/cac_servers_cache.json} cac_tasks_cache=${cac_tasks_cache-$HOME/tmp/cac_tasks_cache.json} cac_templates_cache=${cac_templates_cache-$HOME/tmp/cac_templates_cache.json} - +update_interval=${update_interval-10} cac_secrets=${cac_secrets-$HOME/.secrets/cac} _load_secrets() { @@ -275,9 +275,15 @@ __cac_cli__waitstatus() { ;; esac - echo "$(date -Is) Waiting for status: $2; current status: $status ..." >&2 - - __cac_cli__waitforcacheupdate __cac_cli__waitstatus "$@" + # always_update is not compatible with inotifywait + if test -z "${always_update:-}";then + echo "$(date -Is) Waiting for status: $2; current status: $status ..." >&2 + __cac_cli__waitforcacheupdate __cac_cli__waitstatus "$@" + else + echo "$(date -Is) Waiting ${update_interval}secs for status: $2; current status: $status ..." + sleep ${update_interval} + __cac_cli__waitstatus "$@" + fi } |