Skip to content
Browse files

fixing broken tests

  • Loading branch information...
1 parent 452acb2 commit 1e2bf454ce53fc35b9af986fed17bcc0b9c9f0f3 Matt George committed Jul 18, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 pyres/job.py
  2. +1 −1 pyres/worker.py
  3. +2 −2 tests/test_worker.py
View
2 pyres/job.py
@@ -89,7 +89,7 @@ def perform(self):
raise
else:
metadata["retried"] = True
- logging.exception("Retry scheduled after error in %s", job)
+ logging.exception("Retry scheduled after error in %s", self._payload)
finally:
after_perform = getattr(payload_class, "after_perform", None)
if after_perform and check_after:
View
2 pyres/worker.py
@@ -205,7 +205,7 @@ def fork_worker(self, job):
# If the child process' job called os._exit manually we need to
# finish the clean up here.
if self.job():
- self.done_working()
+ self.done_working(job)
logger.debug('done waiting')
else:
View
4 tests/test_worker.py
@@ -122,7 +122,7 @@ def test_get_job(self):
name = "%s:%s:%s" % (os.uname()[1],os.getpid(),'basic')
assert worker.job() == ResQ.decode(self.redis.get('resque:worker:%s' % name))
assert worker.processing() == ResQ.decode(self.redis.get('resque:worker:%s' % name))
- worker.done_working()
+ worker.done_working(job)
w2 = Worker(['basic'])
print w2.job()
assert w2.job() == {}
@@ -158,7 +158,7 @@ def test_state(self):
job = Job.reserve('basic', self.resq)
worker.working_on(job)
assert worker.state() == 'working'
- worker.done_working()
+ worker.done_working(job)
assert worker.state() == 'idle'
def test_prune_dead_workers(self):

0 comments on commit 1e2bf45

Please sign in to comment.
Something went wrong with that request. Please try again.