Indicator Task Syncing
This document outlines the functionality available for synchronising indicator tasks. This is useful for ensuring that all required indicator tasks are created for programme seats, especially when indicator configurations change or seats are created retrospectively.
API Endpoint
An API endpoint is available for super admins to trigger the task syncing process on demand.
- URL:
/sync-indicator-tasks - Method:
GET - Authentication: Requires an authenticated Super Admin user.
Parameters
The following query parameters can be used:
seat(integer, optional): The ID of a specificorganisation_programme_seatsto sync tasks for.programme(integer, optional): The ID of a specificprogrammesto sync tasks for all its seats.historic(boolean, optional): Use1to create historic tasks or0to exclude them. Defaults to0(false).
Note: You must provide either a
seator aprogrammeID.
Artisan Command
A corresponding Artisan command is available for manual triggering via the CLI.
php artisan indicators:create-missing-tasks
Options
--seat=<id>: The ID of a specific seat to process.--programme=<id>: The ID of a programme to process.--historic=<1|0>: Set to1to include historic tasks. Defaults to0.--tenant=<id>: The tenant ID to process. Defaults to1.
Scheduled Task
The indicators:create-missing-tasks command is scheduled to run automatically to catch any missing tasks.
- Schedule: Daily at 20:00.
- Note: This is intended as a safety net. Any tasks created by this job may indicate an issue elsewhere in the system that needs investigation. There is a
TODOin the code to potentially remove this scheduled job once the system has stabilised.