Skip to content

Commit 1070aaa

Browse files
committed
Update task executor function logs and documentation
1 parent 97444d8 commit 1070aaa

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

functions-python/tasks_executor/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ This directory contains Google Cloud Functions used as a single point of access
55
## Usage
66
The function receive the following payload:
77
```
8-
{
8+
{
99
"task": "string", # [required] Name of the task to execute
1010
"payload": { } [optional] Payload to pass to the task
11-
}
12-
"payload": {
11+
}
12+
```
13+
14+
Example:
15+
```json
16+
{
17+
"task": "rebuild_missing_validation_reports",
18+
"payload": {
1319
"dry_run": true,
1420
"filter_after_in_days": 14,
1521
"filter_statuses": ["active", "inactive", "future"]

functions-python/tasks_executor/src/tasks/validation_reports/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
This task generates the missing reports in the GTFS datasets.
44
The reports are generated using the _gtfs_validator_ GCP workflow.
55

6+
## Task ID
7+
Use task Id: `rebuild_missing_validation_reports`
8+
69
## Usage
710
The function receive the following payload:
811
```
@@ -13,13 +16,13 @@ The function receive the following payload:
1316
}
1417
```
1518
Example:
16-
``
19+
```
1720
{
1821
"dry_run": true,
1922
"filter_after_in_days": 14,
2023
"filter_statuses": ["active", "inactive", "future"]
2124
}
22-
`````
25+
```
2326

2427
# GCP environment variables
2528
The function uses the following environment variables:

functions-python/tasks_executor/src/tasks/validation_reports/rebuild_missing_validation_reports.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def rebuild_missing_validation_reports(
128128
if dry_run
129129
else "Rebuild missing validation reports task executed successfully."
130130
)
131-
return {
131+
result = {
132132
"message": message,
133133
"total_processed": total_processed,
134134
"params": {
@@ -139,6 +139,8 @@ def rebuild_missing_validation_reports(
139139
"validator_endpoint": validator_endpoint,
140140
},
141141
}
142+
logging.info(result)
143+
return result
142144

143145

144146
def get_parameters(payload):

0 commit comments

Comments
 (0)