def test_dispatch_with_csv(self): #B: Dispatching with a CSV of job,schedule records schedules the jobs. self.bike.dispatch(csvfilename='tests/test.csv') sched = {_e(k): _e(v) for k, v in self.bike.get_schedules()} self.assertEqual(sched['job1:A'], 'CONTINUE') self.assertEqual(sched['job2:B'], 'STOP') statuses = list(self.bike.get_statuses()) self.assertEqual(len(statuses), 2)
def schedules(self): return { k: _e(v) for k, v in self.r.hgetall(self.bike.schedules_key).items() }
def result(self, jobid): return _e(self.r.hget('biketest-results', jobid))
def schedules(self): return {k: _e(v) for k, v in self.r.hgetall(self.bike.schedules_key).items()}