Skip to content

Commit

Permalink
Use pytest-flake8 and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemill committed Sep 25, 2016
1 parent 48daf30 commit 5a2d74a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,5 +1,5 @@
test:
py.test --pep8 --flakes --cov=rq_retry_scheduler --cov-config .coveragerc
py.test --flake8 --cov=rq_retry_scheduler --cov-config .coveragerc

coverage-html:
coverage html -d coverage_html
Expand Down
7 changes: 2 additions & 5 deletions pytest.ini
@@ -1,7 +1,4 @@
[pytest]
norecursedirs = lib bin
pep8ignore =
rq_retry_scheduler/*/__init__.py E402

flakes-ignore =
**/__init__.py UnusedImport
flake8-ignore =
rq_retry_scheduler/*/__init__.py E402 F401
3 changes: 1 addition & 2 deletions requirements.txt
@@ -1,9 +1,8 @@
# Development pip requirements
rq
pytest>=3.0.2
pytest-pep8
pytest-cov
pytest-mock
pytest-env
pytest-flakes
pytest-flake8
coveralls
4 changes: 2 additions & 2 deletions rq_retry_scheduler/worker.py
Expand Up @@ -38,7 +38,7 @@ def exc_handler(self, job, exc_type, exc_value, traceback):
job.meta['failures'] += 1

self.log.info("Job {}: Exception handler with {} failures".format(
job.id, job.meta['failures']))
job.id, job.meta['failures']))

delay = self.retry_delays.get(job.meta['failures'])

Expand All @@ -49,7 +49,7 @@ def exc_handler(self, job, exc_type, exc_value, traceback):
return True

self.log.info("Job {}: Requeueing in {} into queue {}".format(
job.id, delay, job.origin))
job.id, delay, job.origin))

queue = self.queue_class(job.origin, connection=self.connection)
queue.enqueue_job_in(delay, job)
Expand Down

0 comments on commit 5a2d74a

Please sign in to comment.