Пример #1
0
    def delete_schedule(self, workflow):
        """Delete schedule config for a given workflow.

        Args:
            workflow: The workflow name where the job is defined.
        """
        path = Path(workflow=workflow)
        self._delete_config(path.get_schedule_path())
Пример #2
0
    def delete_schedule(self, workflow):
        """Delete schedule config for a given workflow.

        Args:
            workflow: The workflow name where the job is defined.
        """
        path = Path(workflow=workflow)
        self._delete_config(path.get_schedule_path())
Пример #3
0
    def put_schedule(self, schedule_config):
        """Add or replace a workflow schedule.

        Args:
            schedule_config: The schedule config to add or replace.
        """
        path = Path(workflow=schedule_config.workflow)
        schedule_config_json = Repository._json_pretty_print(
            schedule_config.format())
        self._put_config(path.get_schedule_path(), schedule_config_json)
Пример #4
0
    def put_schedule(self, schedule_config):
        """Add or replace a workflow schedule.

        Args:
            schedule_config: The schedule config to add or replace.
        """
        path = Path(workflow=schedule_config.workflow)
        schedule_config_json = Repository._json_pretty_print(
            schedule_config.format())
        self._put_config(path.get_schedule_path(), schedule_config_json)
Пример #5
0
    def get_schedule(self, workflow):
        """Retrieve schedule config for a given workflow.

        Args:
            workflow: The workflow name whose schedule should be retrieved.
        Returns:
            The schedule config.
        """
        path = Path(workflow=workflow)
        schedule_json = self._get_config(path.get_schedule_path())
        return WorkflowScheduleConfig.from_json(schedule_json)
Пример #6
0
    def get_schedule(self, workflow):
        """Retrieve schedule config for a given workflow.

        Args:
            workflow: The workflow name whose schedule should be retrieved.
        Returns:
            The schedule config.
        """
        path = Path(workflow=workflow)
        schedule_json = self._get_config(path.get_schedule_path())
        return WorkflowScheduleConfig.from_json(schedule_json)
Пример #7
0
 def test_schedule_path(self):
     path = Path(workflow='some_workflow')
     self.assertEqual('/workflow/some_workflow/schedule',
                      path.get_schedule_path())
Пример #8
0
 def test_schedule_path(self):
     path = Path(workflow='some_workflow')
     self.assertEqual('/workflow/some_workflow/schedule',
                      path.get_schedule_path())