Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are 5 jobs in sync service:

  • PersonPlacementEmployingBodyTrustJob: Truncates and repopulates the list of connections between trainees and the employingBody trust. It writes data into the database table tcs.PersonTrust.
  • PersonPlacementTrainingBodyTrustJob: Repopulates the list of connections between trainees and the trainingBody trust. It also writes into tcs.PersonTrust, and is triggered after PersonPlacementEmployingBodyTrustJob, so the data wouldn't be truncated at first.
  • PostEmployingBodyTrustJob: Truncates and repopulates the list of connections between posts and the employingBody trust. It writes data into the database tcs.PostTrust.
  • PostTrainingBodyTrustJob: Repopulates the list of connections between posts and the trainingBody trust. It also writes into tcs.PostTrust, and is triggered after PostTrainingBodyTrustJob, so the data wouldn't be truncated at first.
  • PersonElasticSearchSyncJob: Truncates index of persons in ElasticSearch and creates a new index of persons. Then repopulates the documents of PersonViews from TCS-Service and saves these documents in ElasticSearch. 

Time scheduled

00:10 PersonPlacementEmployingBodyTrustJob

01:30 PersonPlacementTrainingBodyTrustJob

01:10 PostEmployingBodyTrustJob

01:20 PostTrainingBodyTrustJob

01:30 PersonElasticSearchSyncJob

Sequence Diagram for sync jobs:

Image Removed

The processing flows of PersonPlacementTrainingBodyTrustJob, PostEmployingBodyTrustJob, PostTrainingBodyTrustJob are similar to PersonPlacementEmployingBodyTrustJob, so there's no need to repeat the diagram.

Image Removed

Table of Contents
absoluteUrltrue

Sequence Diagram for sync jobs:

Image Added

The processing flows of PersonPlacementTrainingBodyTrustJob, PostEmployingBodyTrustJob, PostTrainingBodyTrustJob are similar to PersonPlacementEmployingBodyTrustJob, so there's no need to repeat the diagram.


Image Added

Time scheduled

00:05 PersonOwnerRebuildJob

00:09 PersonPlacementEmployingBodyTrustJob

00:29 PersonPlacementTrainingBodyTrustJob

01:09 PostEmployingBodyTrustJob

01:19 PostTrainingBodyTrustJob

01:29 PersonElasticSearchSyncJob

01:45 PostFundingStatusSyncJob

02:00 PersonRecordStatusJob

If the container is restarted in a pre-defined time range (00:00:00+00:00 to 07:00:00+00:00) then the jobs are run sequentially.

Note: All the time are here in UTC


Run jobs out of schedule

Where possible; it is easiest to use the web interface at the root of the application (https://<host IP/domain name here>/sync/.).




DEPRECATED:

If a job needs to be run from the server, the instructions taken from Refresh Elasticsearch cache page can be used:

  1. Copy the commands below into your favorite text editor.
  2. Replace the $bean_name and $job_method with the ones for the job you are re-running.
  3. ssh into either the blue or green server and paste the modified commands in a single chunk and it will go through the process of:
    1. downloading the JDK and the JMX client
    2. copy them to the container
    3. extract the compressed JDK
    4. launch the JMX client and
    5. restart the sync job.

N.B. Refer to the "Job Execution Order" above to see whether there is an appending Job which needs to be run afterward.


cd /tmp
mkdir javatools
cd javatools
wget https://heetisrequiredapps.blob.core.windows.net/javafiles/jmxterm-1.0.0-uber.jar
wget https://heetisrequiredapps.blob.core.windows.net/javafiles/jdk-8-linux-x64.tar.gz
cd ..
docker cp javatools sync_sync_1:/tmp
docker exec -it sync_sync_1 /bin/bash
cd /tmp/javatools
tar -zxvf jdk-8-linux-x64.tar.gz
rm jdk-8-linux-x64.tar.gz
./jdk1.8.0_202/bin/java -jar jmxterm-1.0.0-uber.jar
open 1
domain sync.mbean
bean sync.mbean:name=$bean_name
run $job_method
run isCurrentlyRunning
exit

When you're back at the bash-4.4# prompt you can run the following command to keep an eye on the progress of the sync.

tail /var/log/apps/sync.log -f