mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-18 11:50:11 +08:00
Merge pull request #1442 from quantopian/schedule-all-the-hours
ENH: Let event offsets be up to 12 hours.
This commit is contained in:
@@ -90,12 +90,12 @@ def _out_of_range_error(a, b=None, var='offset'):
|
||||
def _td_check(td):
|
||||
seconds = td.total_seconds()
|
||||
|
||||
# 23400 seconds is 6 hours and 30 minutes.
|
||||
if 60 <= seconds <= 23400:
|
||||
# 43200 seconds = 12 hours
|
||||
if 60 <= seconds <= 43200:
|
||||
return td
|
||||
else:
|
||||
raise ValueError('offset must be in between 1 minute and 6 hours and'
|
||||
' 30 minutes inclusive')
|
||||
raise ValueError('offset must be in between 1 minute and 12 hours, '
|
||||
'inclusive.')
|
||||
|
||||
|
||||
def _build_offset(offset, kwargs, default):
|
||||
|
||||
Reference in New Issue
Block a user