-
Notifications
You must be signed in to change notification settings - Fork 0
Team Spirit Cron Job
SAI-NEEL-BADI edited this page Sep 15, 2022
·
5 revisions
Team spirit cron job is responsible to fetch team spirit rating continuously from Team Spirit application and save the surveys with rating in database.
-
Found team name in team spirit application
- get survey results
- case 1: surveys exist completed surveys and on going survey
- get latest completed survey and save in db if survey doesn't exist in db
- schedule first cron job on scheduled date(today < latest survey end date + frequency )
- fetch latest survey and save in db if not saved in db
- start second cron job for every frequency days
- terminates first cron job
- run second cron job for every frequency days
- fetch latest survey and save in db if survey rating doesn't exist in db
- case 2: surveys does not exist completed surveys and exists on going survey
1. Schedule first cron job latest survey end date
* fetch survey on trigger of cron job and save it in db
* start second cron job for every frequency days
* terminates first cron job
2. Run second cron for every frequency days
* fetch latest survey and save in db if survey doesn't exist in db.
- case 1: surveys exist completed surveys and on going survey
- get survey results
-
Team not found in team spirit application
- send error message as "Team name not found in team spirit application.
- if cron job for a team is already running
- stop cron job for a team
- start cron job for a team