-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
187e8a7
commit 643103d
Showing
3 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Architecture | ||
|
||
## TspSyncStrategy | ||
|
||
This strategy handles the sync of schools, students, teachers and classes from TSP and replaces both the legacy TspBaseSyncer and TspSchoolSyncer. It responds to the target "tsp". | ||
|
||
The flow looks like this (some of the logic for syncing is done in the provisioning strategy which is shared with the login): | ||
|
||
![Flow of the TSP sync strategy](tsp_sync_strategy.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# How it works | ||
|
||
## Configuration | ||
|
||
- FEATURE_TSP_SYNC_ENABLED - Activates the sync strategy inside the sync console | ||
|
||
- WITH_TSP_SYNC - Activates the cronjob in Kubernetes | ||
|
||
- TSP_API_CLIENT_BASE_URL - Base URL for the TSP API | ||
|
||
- TSP_API_TOKEN_LIFETIME_MS - Lifetime of the access token for the TSP API in milliseconds | ||
|
||
- TSP_SYNC_SCHOOL_LIMIT - The amount of schools the sync handles at once | ||
|
||
- TSP_SYNC_SCHOOL_DAYS_TO_FETCH - The amount of days for which the sync fetches schools from the TSP API | ||
|
||
- TSP_SYNC_DATA_LIMIT - The amount of school data updates the sync handles at once | ||
|
||
- TSP_SYNC_DATA_DAYS_TO_FETCH - The amount of days for which the sync fetches school data from the TSP API | ||
|
||
- FEATURE_TSP_MIGRATION_ENABLED - Activates the migration of TSP users within the sync | ||
|
||
- TSP_SYNC_MIGRATION_LIMIT - The amount of users the sync migrates at once | ||
|
||
## Sync console | ||
|
||
This is a console application that allows you to start the synchronization process for different sources. | ||
|
||
### Usage | ||
|
||
To start the synchronization process, run the following command: | ||
|
||
```bash | ||
npm run nest:start:console sync run <target> | ||
``` | ||
|
||
Where `<target>` is the name of the system you want to start the synchronization for. The currently available systems are: | ||
|
||
- `tsp` - Synchronize Thüringer Schulportal. | ||
|
||
If the target is not provided, the synchronization will not start and the available targets will be displayed in an error message. | ||
|
||
```bash | ||
{ | ||
message: 'Either synchronization is not activated or the target entered is invalid', | ||
data: { enteredTarget: 'tsp', availableTargets: { TSP: 'tsp' }} | ||
} | ||
``` | ||
### TSP synchronization | ||
The TSP synchronization is controlled with the feature flag `FEATURE_TSP_SYNC_ENABLED`. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.