コード例 #1
0
ファイル: repository.py プロジェクト: Betterment/pinball
    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
ファイル: repository.py プロジェクト: zhengge2017/pinball
    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
ファイル: repository.py プロジェクト: Betterment/pinball
    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
ファイル: repository.py プロジェクト: zhengge2017/pinball
    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
ファイル: repository.py プロジェクト: Betterment/pinball
    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
ファイル: repository.py プロジェクト: zhengge2017/pinball
    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
ファイル: path_test.py プロジェクト: Betterment/pinball
 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())