forked from airbytehq/airbyte
-
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.
🪟 🧹 Add cron string to segment calls, remove outdated
schedule
prop…
…erty use (airbytehq#17672) * update segment schedule frequency calls to include cron string, unify return value format * remove unused frequencyType prop * cleanup * rename and move util
- Loading branch information
1 parent
c170173
commit ada1cbf
Showing
7 changed files
with
25 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
import { ConnectionScheduleData } from "core/request/AirbyteClient"; | ||
|
||
export const getFrequencyFromScheduleData = (scheduleData?: ConnectionScheduleData) => { | ||
if (!scheduleData) { | ||
return "manual"; | ||
} else if (scheduleData.cron) { | ||
return `${scheduleData.cron.cronExpression} ${scheduleData.cron.cronTimeZone}`; | ||
} else if (scheduleData.basicSchedule) { | ||
return `${scheduleData.basicSchedule.units} ${scheduleData.basicSchedule.timeUnit}`; | ||
} | ||
// this should never get called but the linter wants a catch-all | ||
return null; | ||
}; |
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
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
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