add random wait
This commit is contained in:
parent
c0b122f559
commit
fdc31427c7
@ -130,6 +130,8 @@ if __name__ == "__main__":
|
|||||||
ch.setFormatter(formatter)
|
ch.setFormatter(formatter)
|
||||||
logger.addHandler(ch)
|
logger.addHandler(ch)
|
||||||
|
|
||||||
|
time.sleep(random.randint(1, 600))
|
||||||
|
|
||||||
grist_server = "###GRIST_SERVER###"
|
grist_server = "###GRIST_SERVER###"
|
||||||
grist_doc_id = "###GRIST_DOC_ID###"
|
grist_doc_id = "###GRIST_DOC_ID###"
|
||||||
grist_api_key = "###GRIST_API_KEY###"
|
grist_api_key = "###GRIST_API_KEY###"
|
||||||
|
50
playbook.yml
50
playbook.yml
@ -357,56 +357,6 @@
|
|||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# - name: Check "not have enough balance"
|
|
||||||
# ansible.builtin.command: docker logs {{ item }} 2>&1
|
|
||||||
# register: docker_logs_check
|
|
||||||
# changed_when: false
|
|
||||||
# failed_when: '"not have enough balance" in docker_logs_check.stdout'
|
|
||||||
# with_items:
|
|
||||||
# - worker
|
|
||||||
# - worker-1
|
|
||||||
# - worker-2
|
|
||||||
#
|
|
||||||
# - name: Wait send to chain success
|
|
||||||
# ansible.builtin.shell: |
|
|
||||||
# python3 logs_parser.py 130
|
|
||||||
# args:
|
|
||||||
# chdir: "{{ ansible_env.HOME }}/basic-coin-prediction-node"
|
|
||||||
# register: docker_logs_check
|
|
||||||
# changed_when: false
|
|
||||||
# failed_when: docker_logs_check.rc != 0
|
|
||||||
#
|
|
||||||
# - name: Check updater endpoint
|
|
||||||
# ansible.builtin.shell: |
|
|
||||||
# response=$(curl --silent --location --request GET http://localhost:8000/update) && \
|
|
||||||
# if [ "$response" != "0" ]; then
|
|
||||||
# echo "Updater endpoint check failed: $response != 0"
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
# register: updater_shell_response
|
|
||||||
# retries: 2
|
|
||||||
# delay: 60
|
|
||||||
# until: updater_shell_response.rc == 0
|
|
||||||
# changed_when: false
|
|
||||||
#
|
|
||||||
# - name: Check inference endpoint
|
|
||||||
# ansible.builtin.shell: |
|
|
||||||
# response=$(curl --silent --location --request GET http://localhost:8000/inference/{{ token }}) && \
|
|
||||||
# status=$(curl -o /dev/null -s -w "%{http_code}\\n" http://localhost:8000/inference/{{ token }}) && \
|
|
||||||
# if [ "$status" -ne 200 ] || ! echo "$response" | grep -qE '^[0-9]+(\.[0-9]+)?$'; then
|
|
||||||
# echo "Inference endpoint check failed: status $status, response $response"
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
# register: inference_shell_response
|
|
||||||
# retries: 2
|
|
||||||
# delay: 60
|
|
||||||
# failed_when: inference_shell_response.rc != 0
|
|
||||||
# changed_when: false
|
|
||||||
|
|
||||||
- name: Remove docker login credentials
|
- name: Remove docker login credentials
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /root/.docker/config.json
|
path: /root/.docker/config.json
|
||||||
|
Loading…
Reference in New Issue
Block a user