Skip to content

Commit 3f38a06

Browse files
committed
Removed unneeded function for read execution cpunt
1 parent 5143f66 commit 3f38a06

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/scheduling/schedule_config.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ def _read_repeat_period(incoming_schedule_config):
3131
return period
3232

3333

34-
def _read_executions_count(incoming_schedule_config):
35-
executions_count = model_helper.read_int_from_config('executions_count', incoming_schedule_config)
36-
if executions_count is None:
37-
executions_count = 0
38-
elif executions_count < 0:
39-
raise InvalidScheduleException('executions_count should be > 0')
40-
return executions_count
41-
4234
def _read_end_arg_int(incoming_schedule_config):
4335
end_arg = model_helper.read_int_from_config('end_arg', incoming_schedule_config)
4436
if end_arg is None:
@@ -87,7 +79,7 @@ def read_schedule_config(incoming_schedule_config):
8779
prepared_schedule_config = ScheduleConfig(repeatable, start_datetime)
8880
if repeatable:
8981

90-
prepared_schedule_config.executions_count = _read_executions_count(incoming_schedule_config)
82+
prepared_schedule_config.executions_count = model_helper.read_int_from_config('executions_count', incoming_schedule_config, default=0)
9183

9284
prepared_schedule_config.end_option, prepared_schedule_config.end_arg = _read_end_args(incoming_schedule_config)
9385

0 commit comments

Comments
 (0)