Skip to content

Commit

Permalink
Prefer cron scheduling when user enables scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
byronhulcher committed Nov 28, 2022
1 parent fdd04e1 commit a2ebf65
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@ export const AutomaticCrawlSchedulerLogic = kea<
clearCrawlSchedule: () => DEFAULT_VALUES.crawlFrequency,
setCrawlSchedule: (_, { crawlSchedule: { frequency } }) => frequency,
setCrawlFrequency: (_, { crawlFrequency }) => crawlFrequency,
// TODO Enable this reducer once BE allows
// setUseConnectorSchedule: (crawlFrequency) =>
// crawlFrequency || DEFAULT_VALUES.crawlFrequency,
setUseConnectorSchedule: (crawlFrequency) =>
crawlFrequency || DEFAULT_VALUES.crawlFrequency,
},
],
crawlUnit: [
Expand All @@ -112,7 +111,7 @@ export const AutomaticCrawlSchedulerLogic = kea<
clearCrawlSchedule: () => DEFAULT_VALUES.crawlUnit,
setCrawlSchedule: (_, { crawlSchedule: { unit } }) => unit,
setCrawlUnit: (_, { crawlUnit }) => crawlUnit,
// setUseConnectorSchedule: (crawlUnit) => crawlUnit || DEFAULT_VALUES.crawlUnit,
setUseConnectorSchedule: (crawlUnit) => crawlUnit || DEFAULT_VALUES.crawlUnit,
},
],
isSubmitting: [
Expand All @@ -126,8 +125,8 @@ export const AutomaticCrawlSchedulerLogic = kea<
useConnectorSchedule: [
false,
{
// setCrawlAutomatically: (useConnectorSchedule, { crawlAutomatically }) =>
// crawlAutomatically || useConnectorSchedule,
setCrawlAutomatically: (useConnectorSchedule, { crawlAutomatically }) =>
crawlAutomatically || useConnectorSchedule,
setCrawlSchedule: (_, { crawlSchedule: { useConnectorSchedule = false } }) =>
useConnectorSchedule,
setUseConnectorSchedule: (_, { useConnectorSchedule }) => useConnectorSchedule,
Expand Down

0 comments on commit a2ebf65

Please sign in to comment.