Mercurial > code > home > repos > homeauto
comparison service/frontDoorLock/tasks.py @ 1456:a81def58ecfb
index page rewrite. mqtt subscribe update. new store/events graph uri
Ignore-this: f0e59d3487ebfc90f8f4a830a7084023
darcs-hash:45bd18fecdb41c90b786a9e5909111e4a17bfcbe
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Wed, 25 Sep 2019 17:36:44 -0700 |
parents | fecbac537f63 |
children |
comparison
equal
deleted
inserted
replaced
1455:1a7cd0cff3eb | 1456:a81def58ecfb |
---|---|
13 def push_image(ctx): | 13 def push_image(ctx): |
14 ctx.run(f'docker push {TAG}') | 14 ctx.run(f'docker push {TAG}') |
15 | 15 |
16 @task(pre=[build_image]) | 16 @task(pre=[build_image]) |
17 def shell(ctx): | 17 def shell(ctx): |
18 ctx.run(f'docker run --name={JOB}_shell --rm -it --cap-add SYS_PTRACE --net=host {TAG} /bin/bash', pty=True) | 18 ctx.run(f'docker run --name={JOB}_shell --rm -it --cap-add SYS_PTRACE --net=host ' |
19 f' -v `pwd`/../../stubs:/opt/stubs' | |
20 f' {TAG} /bin/bash', pty=True) | |
19 | 21 |
20 @task(pre=[build_image]) | 22 @task(pre=[build_image]) |
21 def local_run(ctx): | 23 def local_run(ctx): |
22 ctx.run(f'docker run --name={JOB}_local --rm -it --net=host -v `pwd`/index.html:/opt/index.html {TAG} python3 ./front_door_lock.py -v', pty=True) | 24 ctx.run(f'docker run --name={JOB}_local --rm -it --net=host -v `pwd`/index.html:/opt/index.html {TAG} python3 ./front_door_lock.py -v', pty=True) |
23 | 25 |
47 | 49 |
48 @task | 50 @task |
49 def mqtt_force_lock(ctx): | 51 def mqtt_force_lock(ctx): |
50 ctx.run(f'mosquitto_pub -h bang -p 10010 -t frontdoorlock/switch/strike/command -m OFF') | 52 ctx.run(f'mosquitto_pub -h bang -p 10010 -t frontdoorlock/switch/strike/command -m OFF') |
51 | 53 |
54 | |
55 @task(pre=[build_image]) | |
56 def mypy(ctx): | |
57 ctx.run(f'docker run --rm -it --name={JOB}_mypy --net=host' | |
58 f' -v `pwd`/.mypy_cache:/opt/.mypy_cache' | |
59 f' -v `pwd`/../../stubs:/opt/stubs' | |
60 f' -e MYPYPATH=/opt/stubs' | |
61 f' {TAG}' | |
62 f' /usr/local/bin/mypy -m front_door_lock', pty=True) | |
63 |