MCPcopy Index your code
hub / github.com/bugy/script-server / _read_repeat_unit

Function _read_repeat_unit

src/scheduling/schedule_config.py:16–24  ·  view source on GitHub ↗
(incoming_schedule_config)

Source from the content-addressed store, hash-verified

14 return datetime_value
15
16def _read_repeat_unit(incoming_schedule_config):
17 repeat_unit = incoming_schedule_config.get('repeat_unit')
18 if is_blank(repeat_unit):
19 raise InvalidScheduleException('repeat_unit is required for repeatable schedule')
20
21 if repeat_unit.lower() not in ['minutes', 'hours', 'days', 'weeks', 'months']:
22 raise InvalidScheduleException('repeat_unit should be one of: minutes, hours, days, weeks, months')
23
24 return repeat_unit.lower()
25
26
27def _read_repeat_period(incoming_schedule_config):

Callers 1

read_schedule_configFunction · 0.85

Calls 3

is_blankFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected