add random wait

This commit is contained in:
vvzvlad 2024-11-23 05:10:51 +03:00
parent c0b122f559
commit fdc31427c7
2 changed files with 2 additions and 50 deletions

View File

@ -130,6 +130,8 @@ if __name__ == "__main__":
ch.setFormatter(formatter)
logger.addHandler(ch)
time.sleep(random.randint(1, 600))
grist_server = "###GRIST_SERVER###"
grist_doc_id = "###GRIST_DOC_ID###"
grist_api_key = "###GRIST_API_KEY###"

View File

@ -357,56 +357,6 @@
enabled: yes
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
ansible.builtin.file:
path: /root/.docker/config.json