-
Notifications
You must be signed in to change notification settings - Fork 2
Cronjobs Documentation
The application uses Flask-Celery with Redis to manage and execute cronjobs. A separate cronjob container is responsible for scheduling these tasks, which are defined in a crontab file. The cronjobs communicate with the Flask API and can be triggered either on schedule or manually via API requests.
The cronjobs are managed by a dedicated container containing a crontab file that schedules API requests to the Flask app. The cronjobs can also be triggered manually by sending a request to the /cronjob API endpoint.
To trigger a cronjob via the API, send a request to the cronjob
endpoint using the format:
parent_dict_key/nested_child_key
For example, to import biosamples, the endpoint would be:
/cronjob/biosamples/import
Below are the currently available cronjobs and their respective API keys:
-
Biosamples
-
Import Biosamples:
API Key:biosamples/import
Function:biosamples.import_biosamples_from_project_names
-
Get Biosamples Derived From Parent:
API Key:biosamples/derived_from
Function:biosamples.get_biosamples_derived_from_parent
-
Get Biosample Parents:
API Key:biosamples/parents
Function:biosamples.get_biosample_parents
-
Import Biosamples:
-
Experiments
-
Import Experiments:
API Key:experiments/import
Function:experiments.get_experiments_from_bioproject_accession
-
Import Experiments:
-
Assemblies
-
Import Assemblies by Bioproject:
API Key:assemblies/import
Function:assemblies.import_assemblies_by_bioproject
-
Add Blobtoolkit Link:
API Key:assemblies/blob_link
Function:assemblies.add_blob_link
-
Import Assemblies by Bioproject:
-
Helpers
-
Handle Orphan Organisms:
API Key:helpers/handle_orphans
Function:taxonomy.handle_orphan_organisms
-
Add Lineage to Models:
API Key:helpers/add_lineage
Function:taxonomy.add_lineage
-
Handle Orphan Organisms:
-
Geolocation
-
Create Coordinates from Local Samples:
API Key:geo_locations/create_from_local_samples
Function:geolocation.create_local_sample_coordinates
-
Create Coordinates from Biosamples:
API Key:geo_locations/create_from_biosamples
Function:geolocation.create_biosample_coordinates
-
Update All Countries:
API Key:geo_locations/create_countries
Function:geolocation.update_all_countries
-
Create Coordinates from Local Samples: