From c7587340485cb6be83f816d71c5429af6b95b9b9 Mon Sep 17 00:00:00 2001 From: CARRON Guilhem <guilhem.carron@soprasteria.com> Date: Wed, 29 Jul 2020 09:59:45 +0200 Subject: [PATCH] WIP: test random cron --- src/components/ContentComponents/Report/Report.tsx | 3 +++ src/services/fluidConfigService.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ContentComponents/Report/Report.tsx b/src/components/ContentComponents/Report/Report.tsx index c5e5656d6..1526d4538 100644 --- a/src/components/ContentComponents/Report/Report.tsx +++ b/src/components/ContentComponents/Report/Report.tsx @@ -3,6 +3,7 @@ import { translate } from 'cozy-ui/react/I18n' import { AppContext } from 'components/Contexts/AppContextProvider' import UserProfileManager from 'services/userProfileDataManagerService' import { Client, withClient } from 'cozy-client' +import KonnectorStatusService from 'services/konnectorStatusService' interface ReportProps { t: Function @@ -24,6 +25,8 @@ const Report: React.FC<ReportProps> = ({ t, client }: ReportProps) => { updatedUserProfile(e.target.value) } + const kss = new KonnectorStatusService(client) + console.log(kss.getAllTriggers()) return ( <div className="report-root"> <div className="report-content"> diff --git a/src/services/fluidConfigService.ts b/src/services/fluidConfigService.ts index d094f933a..96d72f5ef 100644 --- a/src/services/fluidConfigService.ts +++ b/src/services/fluidConfigService.ts @@ -17,7 +17,7 @@ export default class FluidConfig { * @param min Minimum hour for cron * @param max Maximum hour for cron */ - public getCronArgs(min = 8, max = 10): string { + public getCronArgs(min = 8, max = 9): string { const randomHour = Math.floor(Math.random() * (max - min + 1) + min) const randomMinutes = Math.floor(Math.random() * 59) return `0 ${randomMinutes} ${randomHour} * * *` -- GitLab