Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 def schedules(self):
     return {
         k: _e(v)
         for k, v in self.r.hgetall(self.bike.schedules_key).items()
     }
Пример #4
0
 def result(self, jobid):
     return _e(self.r.hget('biketest-results', jobid))
Пример #5
0
 def schedules(self):
     return {k: _e(v) for k, v
             in self.r.hgetall(self.bike.schedules_key).items()}
Пример #6
0
 def result(self, jobid):
     return _e(self.r.hget('biketest-results', jobid))