Example #1
0
    def get_external_schedule_execution_data(
        self,
        instance,
        repository_handle,
        schedule_name,
        schedule_execution_data_mode,
        scheduled_execution_datetime_utc,
    ):
        check.inst_param(instance, "instance", DagsterInstance)
        check.inst_param(repository_handle, "repository_handle",
                         RepositoryHandle)
        check.str_param(schedule_name, "schedule_name")
        check.inst_param(schedule_execution_data_mode,
                         "schedule_execution_data_mode",
                         ScheduleExecutionDataMode)
        check.opt_inst_param(scheduled_execution_datetime_utc,
                             "scheduled_execution_datetime_utc", datetime)

        return sync_get_external_schedule_execution_data_grpc(
            self._handle.client,
            instance,
            repository_handle,
            schedule_name,
            schedule_execution_data_mode,
            scheduled_execution_datetime_utc,
        )
Example #2
0
    def get_external_schedule_execution_data(self, instance, repository_handle, schedule_name):
        check.inst_param(instance, 'instance', DagsterInstance)
        check.inst_param(repository_handle, 'repository_handle', RepositoryHandle)
        check.str_param(schedule_name, 'schedule_name')

        return sync_get_external_schedule_execution_data_grpc(
            self._handle.client, instance, repository_handle, schedule_name
        )
def test_external_partitions_api_grpc():
    repository_handle = get_bar_repo_handle()
    with seven.TemporaryDirectory() as temp_dir:
        instance = DagsterInstance.local_temp(temp_dir)
        execution_data = sync_get_external_schedule_execution_data_grpc(
            instance, repository_handle, 'foo_schedule'
        )
        assert isinstance(execution_data, ExternalScheduleExecutionData)
        assert execution_data.run_config is not None
Example #4
0
    def get_external_schedule_execution_data(
        self,
        instance: DagsterInstance,
        repository_handle: RepositoryHandle,
        schedule_name: str,
        scheduled_execution_time: Optional[datetime.datetime],
    ) -> "ExternalScheduleExecutionData":
        check.inst_param(instance, "instance", DagsterInstance)
        check.inst_param(repository_handle, "repository_handle", RepositoryHandle)
        check.str_param(schedule_name, "schedule_name")
        check.opt_inst_param(scheduled_execution_time, "scheduled_execution_time", PendulumDateTime)

        return sync_get_external_schedule_execution_data_grpc(
            self.client,
            instance,
            repository_handle,
            schedule_name,
            scheduled_execution_time,
        )