Compare commits
4 Commits
957227b715
...
master
Author | SHA1 | Date | |
---|---|---|---|
489883b464 | |||
f3e8750ff1 | |||
c50cd6b23a | |||
32f104df7c |
2
.coveragerc
Normal file
2
.coveragerc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[run]
|
||||||
|
omit=venv/*
|
10
.drone.yml
10
.drone.yml
@ -35,6 +35,16 @@ steps:
|
|||||||
- pip3 install --cache-dir='./.pipcache' -r requirements.txt
|
- pip3 install --cache-dir='./.pipcache' -r requirements.txt
|
||||||
- pytest test.py
|
- pytest test.py
|
||||||
|
|
||||||
|
- name: coverage
|
||||||
|
image: python:3.8
|
||||||
|
environment:
|
||||||
|
PRODUCER_REDIS: cache
|
||||||
|
commands:
|
||||||
|
- pip3 install --cache-dir='./.pipcache' -r requirements.txt
|
||||||
|
- pip3 install --cache-dir='./.pipcache' coverage pytest
|
||||||
|
- coverage run -m pytest test.py
|
||||||
|
- coverage report -m
|
||||||
|
|
||||||
- name: integration_test
|
- name: integration_test
|
||||||
image: python:3.8
|
image: python:3.8
|
||||||
environment:
|
environment:
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -131,3 +131,4 @@ dmypy.json
|
|||||||
#Pycharm
|
#Pycharm
|
||||||
.idea/
|
.idea/
|
||||||
*.iml
|
*.iml
|
||||||
|
.coverage
|
@ -80,7 +80,7 @@ class ConsumerLocator:
|
|||||||
if not self.communicator.checkconsumer(consumer["Host"]):
|
if not self.communicator.checkconsumer(consumer["Host"]):
|
||||||
consumer["State"] = False
|
consumer["State"] = False
|
||||||
if datetime.datetime.now() - datetime.datetime.fromtimestamp(consumer["LastOk"]) > datetime.timedelta(
|
if datetime.datetime.now() - datetime.datetime.fromtimestamp(consumer["LastOk"]) > datetime.timedelta(
|
||||||
hours=1):
|
seconds=15):
|
||||||
removelist.append(consumer)
|
removelist.append(consumer)
|
||||||
else:
|
else:
|
||||||
consumer["LastOk"] = datetime.datetime.now().timestamp()
|
consumer["LastOk"] = datetime.datetime.now().timestamp()
|
||||||
|
Reference in New Issue
Block a user