Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def schedule(self, schedule_id):
return Schedule(self._context, self.job_id, schedule_id)
def schedule_by_token(self, schedule_token):
return Schedule(
self._context, *self._context.ids(schedule_token)
)
def execution_by_token(self, execution_token):
# workaround: executions only reachable through
# schedules ATM
job_id, schedule_id, execution_id = self.tokens.ids(execution_token)
schedule = Schedule(self, job_id, schedule_id)
return schedule.execution(execution_id)
def schedule_by_token(self, schedule_token):
return Schedule(
self, *self.tokens.ids(schedule_token)
)