chore(lms): activate qualfication job in crontab
This commit is contained in:
parent
265107859e
commit
1ae2cd0846
@ -68,7 +68,7 @@ synchronise-ldap-users-interval: "_env:SYNCHRONISE_LDAP_INTERVAL:3600"
|
||||
study-features-recache-relevance-within: 172800
|
||||
study-features-recache-relevance-interval: 293
|
||||
|
||||
qualification-check: 28800
|
||||
qualification-check: 3
|
||||
|
||||
log-settings:
|
||||
detailed: "_env:DETAILED_LOGGING:false"
|
||||
|
||||
@ -360,16 +360,18 @@ determineCrontab = execWriterT $ do
|
||||
, cronRateLimit = appStudyFeaturesRecacheRelevanceInterval
|
||||
, cronNotAfter = Right . CronTimestamp . utcToLocalTimeTZ appTZ $ addUTCTime appStudyFeaturesRecacheRelevanceInterval nextIntervalTime
|
||||
}
|
||||
{-
|
||||
whenIsJust appQualificationChecks $ \cInterval -> tell $ HashMap.singleton
|
||||
|
||||
whenIsJust appQualificationCheck $ \_ -> tell $ HashMap.singleton
|
||||
(JobCtlQueue JobLmsQualifications)
|
||||
Cron
|
||||
{ cronInitial = CronAsap
|
||||
, cronRepeat = CronRepeatScheduled . CronCalendar $ cronCalendarAny {}
|
||||
, cronRateLimit = TODO: CONTINUE HERE
|
||||
, cronNotAfter =
|
||||
{ cronInitial = CronAsap -- time after scheduling
|
||||
, cronRepeat = CronRepeatScheduled $ cronCalendarAny { cronHour = cronMatchOne 3 -- cronHour = CronMatchSome (impureNonNull $ Set.fromList [3,15] )
|
||||
, cronMinute = cronMatchOne 1
|
||||
, cronSecond = cronMatchOne 0
|
||||
}
|
||||
, cronRateLimit = nominalDay / 2 -- minimal time between two executions, before the second job is skipped
|
||||
, cronNotAfter = Left nominalDay -- maximal delay of an execution, before it is skipped entirely
|
||||
}
|
||||
-}
|
||||
|
||||
let
|
||||
correctorNotifications :: Map (UserId, SheetId) (Max UTCTime) -> WriterT (Crontab JobCtl) (ReaderT SqlReadBackend (HandlerFor UniWorX)) ()
|
||||
|
||||
@ -32,7 +32,7 @@ dispatchJobLmsQualifications = JobHandlerAtomic act
|
||||
-- E.&&. q E.^. QualificationElearningStart -- checked later, since we need to send out notifications regardless
|
||||
pure $ q E.^. QualificationId
|
||||
forM_ qids $ \(E.unValue -> qid) -> do
|
||||
$logInfoS "lms" $ "Start e-learning for qualification " <> tshow qid <> "."
|
||||
$logInfoS "lms" $ "Start e-learning for qualification " <> tshow qid <> "."
|
||||
queueDBJob $ JobLmsEnqueue qid
|
||||
|
||||
|
||||
|
||||
@ -300,8 +300,8 @@ determineNotificationCandidates = awaitForever $ \notif -> do
|
||||
E.&&. application E.^. CourseApplicationCourse E.==. E.val nCourse
|
||||
|
||||
return (hasOverride, user)
|
||||
NotificationQualificationExpiry{} -> return mempty -- Not used with JobQueueNotification; recipients already known
|
||||
NotificationQualificationRenewal{} -> return mempty -- Not used with JobQueueNotification; recipients already known
|
||||
NotificationQualificationExpiry{} -> return mempty -- Not to be used with JobQueueNotification; recipients already known
|
||||
NotificationQualificationRenewal{} -> return mempty -- Not to be used with JobQueueNotification; recipients already known
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user