RangeHourly任务总是遇到。跳过其他任务的执行。
我尝试使用不同的参数,但不幸的是,结果始终相同。
import luigi
import datetime
class Test(luigi.Task):
dt = luigi.DateMinuteParameter()
latest = datetime.datetime(2014, 05, 01)
def run(self):
print self.dt
Test.latest = max(Test.latest, self.dt)
def complete(self):
return self.dt <= Test.latest
@classmethod
def bulk_complete(cls, *args, **kwargs):
return []
if __name__ == '__main__':
luigi.run()
日志:
$ python test.py RangeHourly --of Test --start 2015-05-01T00 --stop 2015-05-02T00 --local-schedule
DEBUG: Checking if RangeHourly(of=Test, of_params={}, reverse=False, task_limit=50, now=None, param_name=None, start=2015-05-01T00, stop=2015-05-02T00, hours_back=2400, hours_forward=0) is complete
DEBUG: Empty range. No Test instances expected
INFO: Informed scheduler that task RangeHourly_2400_0_None_153c857a8f has status DONE
INFO: Done scheduling tasks
INFO: Running Worker with 1 processes
DEBUG: Asking scheduler for work...
DEBUG: Done
DEBUG: There are no more tasks to run at this time
INFO: Worker Worker(salt=062617973, workers=1, host=d42eb853bfc1, username=root, pid=303) was stopped. Shutting down Keep-Alive thread
INFO:
===== Luigi Execution Summary =====
Scheduled 1 tasks of which:
* 1 complete ones were encountered:
- 1 RangeHourly(...)
Did not run any tasks