diff --git a/src/Handler/Admin/Test.hs b/src/Handler/Admin/Test.hs index 3fff50aab..906c941bf 100644 --- a/src/Handler/Admin/Test.hs +++ b/src/Handler/Admin/Test.hs @@ -222,6 +222,8 @@ postAdminTestR = do usrCryptoFileName <- maybeM (return "no-user_id") (fmap toPathPiece . mkCryptoFilnameUser) maybeAuthId usrCryptoUUID <- maybeM (return "no-user_id") (fmap toPathPiece . mkCryptoUUIDUser) maybeAuthId + UniWorX{ appSettings' = AppSettings{..} } <- getYesod + let locallyDefinedPageHeading = [whamlet|Admin TestPage for Uni2work|] siteLayout locallyDefinedPageHeading $ do -- defaultLayout $ do @@ -311,6 +313,18 @@ postAdminTestR = do |] i18n $ MsgPrintDebugForStupid "DebugForStupid" + [whamlet| +
+

Some Active App Settings +
+
appJobCronInterval +
#{tshow appJobCronInterval} +
appSynchroniseLdapUsersWithin +
#{tshow appSynchroniseLdapUsersWithin} +
appSynchroniseAvsUsersWithin +
#{tshow appSynchroniseAvsUsersWithin} + |] + diff --git a/src/Jobs/Crontab.hs b/src/Jobs/Crontab.hs index c784f572b..fe0d3661a 100644 --- a/src/Jobs/Crontab.hs +++ b/src/Jobs/Crontab.hs @@ -338,6 +338,7 @@ determineCrontab = execWriterT $ do , Just cInterval <- appJobCronInterval -> do now <- liftIO getCurrentTime + let nowaday = utctDay now nextIntervals <- getNextIntervals syncWithin appSynchroniseAvsUsersInterval cInterval forM_ nextIntervals $ \(nextEpoch, nextInterval, nextIntervalTime, numIntervals) -> do @@ -346,7 +347,7 @@ determineCrontab = execWriterT $ do { jEpoch = fromInteger nextEpoch , jNumIterations = fromInteger numIntervals , jIteration = fromInteger nextInterval - , jSynchAfter = Just $ addWeeks (-1) now -- at most once per week + , jSynchAfter = Just $ toMidnight $ addDays (-7) nowaday -- at most once per week }) Cron { cronInitial = CronTimestamp $ utcToLocalTimeTZ appTZ $ toTimeOfDay 22 0 0 $ utctDay nextIntervalTime diff --git a/src/Jobs/Types.hs b/src/Jobs/Types.hs index e75411160..d77ebba09 100644 --- a/src/Jobs/Types.hs +++ b/src/Jobs/Types.hs @@ -336,7 +336,7 @@ jobNoQueueSame = \case JobPruneInvitations{} -> Just JobNoQueueSame JobDeleteTransactionLogIPs{} -> Just JobNoQueueSame JobSynchroniseLdapUser{} -> Just JobNoQueueSame - JobSynchroniseAvsUser{} -> Just JobNoQueueSame + JobSynchroniseAvsUser{} -> Just JobNoQueueSameTag JobSynchroniseAvsId{} -> Just JobNoQueueSame JobChangeUserDisplayEmail{} -> Just JobNoQueueSame JobPruneSessionFiles{} -> Just JobNoQueueSameTag