Beispiel #1
0
 def it_is_expired(self, job):
     expect(job.expiration).to_be_less_than(time.time())
     expect(job.timeToLive()).to_equal(0)
     expect(float(client.get('q:job:%s:expires' % (job.job_id)))).to_be_less_than(time.time())
Beispiel #2
0
 def the_job_expires_in_the_future(self, job):
     expiration = float(client.get('q:job:%s:expires' % (job.job_id)))
     expect(expiration).to_be_greater_than(time.time())
     expect(job.timeToLive()).to_be_greater_than(0)