Compare commits

..

4 Commits

Author SHA1 Message Date
489883b464 lowered giveup time
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-14 23:02:52 +02:00
f3e8750ff1 pytest is missing for some reason
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-14 20:50:22 +02:00
c50cd6b23a install requirements in coverage step
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-14 20:48:47 +02:00
32f104df7c coverage
Some checks failed
continuous-integration/drone/push Build is failing
2020-05-14 20:46:34 +02:00
4 changed files with 14 additions and 1 deletions

2
.coveragerc Normal file
View File

@ -0,0 +1,2 @@
[run]
omit=venv/*

View File

@ -35,6 +35,16 @@ steps:
- pip3 install --cache-dir='./.pipcache' -r requirements.txt
- 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
image: python:3.8
environment:

1
.gitignore vendored
View File

@ -131,3 +131,4 @@ dmypy.json
#Pycharm
.idea/
*.iml
.coverage

View File

@ -80,7 +80,7 @@ class ConsumerLocator:
if not self.communicator.checkconsumer(consumer["Host"]):
consumer["State"] = False
if datetime.datetime.now() - datetime.datetime.fromtimestamp(consumer["LastOk"]) > datetime.timedelta(
hours=1):
seconds=15):
removelist.append(consumer)
else:
consumer["LastOk"] = datetime.datetime.now().timestamp()