Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the normal hitobito API instead of the group_health endpoints #28

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ Make sure you execute all the migrations so the schema and tables are in sync wi

#### Import Data

To run the import you can execute the `run-import.sh` script inside the healthcheck-core service container.
Notice: This might take a while to finish.
To manually run the nightly import of all non-personal data, you can execute the `run-import.sh` script inside the
healthcheck-core service container.

`docker exec healthcheck-core-local ./run-import.sh`

Expand Down
10 changes: 10 additions & 0 deletions config/routing_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ invite_delete:
methods: DELETE
controller: App\Controller\Api\InviteController:deleteInvite

# Sync routes
sync_start:
path: /groups/{groupId}/sync
methods: POST
controller: App\Controller\Api\SyncController::startSync
opt_out:
path: /groups/{groupId}/optOut
methods: POST
controller: App\Controller\Api\SyncController::optOut

# Filter data routes
filter_data:
path: /groups/{groupId}/filter-data
Expand Down
2 changes: 2 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ services:
$pbsCallbackUrl: '%env(PBS_CALLBACK_URL)%'
$specialAccessEmails: '%env(SPECIAL_ACCESS)%'

App\Service\SyncService: ~

App\Service\Aggregator\DemographicGroupAggregator:
tags:
- { name: 'widget.aggregator', key: 'widget.demographic-group' }
Expand Down
4 changes: 2 additions & 2 deletions run-import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ set -e
# Run import commands from symfony project
/usr/local/bin/php /srv/bin/console app:fetch-data
/usr/local/bin/php /srv/bin/console app:import-data
/usr/local/bin/php /srv/bin/console app:map-peoples-addresses
/usr/local/bin/php /srv/bin/console app:aggregate-data
#/usr/local/bin/php /srv/bin/console app:map-peoples-addresses
#/usr/local/bin/php /srv/bin/console app:aggregate-data
2 changes: 1 addition & 1 deletion src/Command/FetchDataCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FetchDataCommand extends StatisticsCommand
public const STAT_TABLE_HEADERS = ['Table Name', 'Duration (s)', 'Items Fetched'];
public const STAT_TOTAL_TABLE_HEADERS = ['Total Duration (s)', 'Total Items Fetched'];

private const PAGINATED = ['people', 'groups', 'roles', 'courses', 'camps', 'participations', 'qualifications'];
private const PAGINATED = [];
private const NOT_PAGINATED = ['group_types', 'role_types', 'participation_types', 'j_s_kinds', 'camp_states',
'qualification_kinds', 'event_kinds'];

Expand Down
Loading