forked from airbytehq/airbyte-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rbroughan/handle cancelled sync workflows (#12271)
- Loading branch information
Showing
3 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...est/java/io/airbyte/workers/temporal/scheduling/testsyncworkflow/CancelledSyncWorkflow.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2020-2024 Airbyte, Inc., all rights reserved. | ||
*/ | ||
package io.airbyte.workers.temporal.scheduling.testsyncworkflow | ||
|
||
import io.airbyte.commons.temporal.scheduling.SyncWorkflow | ||
import io.airbyte.config.StandardSyncInput | ||
import io.airbyte.config.StandardSyncOutput | ||
import io.airbyte.config.StandardSyncSummary | ||
import io.airbyte.config.StandardSyncSummary.ReplicationStatus | ||
import io.airbyte.config.SyncStats | ||
import io.airbyte.persistence.job.models.IntegrationLauncherConfig | ||
import io.airbyte.persistence.job.models.JobRunConfig | ||
import java.util.UUID | ||
|
||
class CancelledSyncWorkflow : SyncWorkflow { | ||
override fun run( | ||
jobRunConfig: JobRunConfig, | ||
sourceLauncherConfig: IntegrationLauncherConfig, | ||
destinationLauncherConfig: IntegrationLauncherConfig, | ||
syncInput: StandardSyncInput, | ||
connectionId: UUID, | ||
): StandardSyncOutput { | ||
return StandardSyncOutput() | ||
.withStandardSyncSummary( | ||
StandardSyncSummary() | ||
.withStatus(ReplicationStatus.CANCELLED) | ||
.withTotalStats(SyncStats()), | ||
) | ||
} | ||
} |