Table of Contents | ||
---|---|---|
|
There are 5 jobs in sync service:
- PersonOwnerRebuildJob: Calls a stored procedure that truncates and repopulates the 'PersonOwner' table based on an ordered list of ProgrammeMembership criteria
- 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.
Sequence Diagram for sync jobs:
...
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.
Job Execution Order
Summary of what to run:
...
PersonPlacementEmployingBodyTrustJob
...
Re-run PersonPlacementTrainingBodyTrustJob
and PersonElasticSearchSyncJob
...
...
Run jobs out of schedule
Instructions taken from Refresh Elasticsearch cache pageWhere possible; it is easiest to use the web interface at the root of the application (https://<host IP/domain name here>/sync/.).
If a job needs to be run manually, e.g. after a database has been re-imported to stagefrom the server, the instructions taken from Refresh Elasticsearch cache page can be used:
- Copy the commands below into your favorite text editor.
- Replace the
$bean_name
and$job_method
with the ones for the job you are re-running. - 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:
- downloading the JDK and the JMX client
- copy them to the container
- extract the compressed JDK
- launch the JMX client and
- restart the sync job.
...