Fix drone and improve timeout
All checks were successful
continuous-integration/drone/push Build is passing

try fix deploy

Check

check2

test

Test 2

Fix drone

test

test2

test3

test4

test5

test6

test7

test8

test9

Handle poor ampli
This commit is contained in:
Nicolas Duhamel 2021-10-31 07:43:10 +01:00
parent 522cc7f1f9
commit e43f4befda
2 changed files with 16 additions and 6 deletions

View File

@ -6,19 +6,27 @@ steps:
- name: Build
image: python
commands:
- echo $PASSWORD
- echo PASSWORD
- echo ${PASSWORD}
- apt-get update
- apt-get -y install python-systemd python3-systemd libsystemd-dev
- apt-get -y install python3-systemd libsystemd-dev
- pip install pex
- pip install .
- pex ./ -m yamaha2mqtt -o yamaha2mqtt.pex
environment:
PASSWORD:
from_secret: ssh_key
- name: Deploy
image: appleboy/drone-scp
settings:
host:
- gavarni.jombi.fr
user: citadel
key:
from_secret: ssh_key
# ssh-key:
# from_secret: ssh_key
password:
from_secret: ssh_password
port: 22
command_timeout: 2m
target: /home/citadel
@ -31,8 +39,10 @@ steps:
host: gavarni.jombi.fr
username: citadel
port: 22
key:
from_secret: ssh_key
# key:
# from_secret: ssh_key
password:
from_secret: ssh_password
script:
- mv yamaha2mqtt.pex ./services/bin/yamaha2mqtt
- systemctl --user restart citadel@yamaha2mqtt

View File

@ -41,7 +41,7 @@ class Yamaha:
for action in senario.deactivate:
self.request(action)
@retry(stop=stop_after_attempt(3), wait=wait_fixed(1), reraise=True)
@retry(stop=stop_after_attempt(3), wait=wait_fixed(2), reraise=True)
def request(self, request):
try:
r = self._device.request(request)