Skip to content

Latest commit

 

History

History
99 lines (82 loc) · 1.67 KB

File metadata and controls

99 lines (82 loc) · 1.67 KB

Tasks Executor

This directory contains Google Cloud Functions used as a single point of access to multiple tasks.

Usage

The function receive the following payload:

{
   "task": "string", # [required] Name of the task to execute
   "payload": { } [optional] Payload to pass to the task
}

Examples:

{
  "task": "rebuild_missing_validation_reports",
  "payload": {
    "dry_run": true,
    "bypass_db_update": true,
    "filter_after_in_days": null,
    "force_update": false,
    "validator_endpoint": "https://stg-gtfs-validator-web-mbzoxaljzq-ue.a.run.app",
    "limit": 1,    
    "filter_statuses": ["active", "inactive", "future"]
  }
}
{
  "task": "get_validation_run_status",
  "payload": {
    "task_name": "gtfs_validation",
    "run_id": "7.1.1-SNAPSHOT"
  }
}
{
  "task": "rebuild_missing_bounding_boxes",
  "payload": {
    "dry_run": true,
    "after_date": "2025-06-01"
  }
}
{
  "task": "refresh_materialized_view",
  "payload": {
    "dry_run": true
  }
}

To get the list of supported tasks use:

{
  "name": "list_tasks",
  "payload": {}
}

To update the geolocation files precision:

{
  "task": "update_geojson_files_precision",
  "payload": {
    "dry_run": true,
    "data_type": "gtfs",
    "precision": 5,
    "limit": 10
  }
}

To populate licenses:

{
  "task": "populate_licenses",
  "payload": {
    "dry_run": true
  }
}

Response Content Type

When the request includes the header Accept: text/csv, the server returns the response as a CSV file generated from the handler’s output. If the header is not provided, the default response content type is application/json.