Skip to content

Commit f8a324b

Browse files
committed
registered handler in main.py
1 parent 4bba3e7 commit f8a324b

File tree

2 files changed

+47
-23
lines changed

2 files changed

+47
-23
lines changed

functions-python/tasks_executor/README.md

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,64 @@ Examples:
1717

1818
```json
1919
{
20-
"task": "rebuild_missing_validation_reports",
21-
"payload": {
22-
"dry_run": true,
23-
"filter_after_in_days": 14,
24-
"filter_statuses": ["active", "inactive", "future"]
25-
}
20+
"task": "rebuild_missing_validation_reports",
21+
"payload": {
22+
"dry_run": true,
23+
"filter_after_in_days": 14,
24+
"filter_statuses": ["active", "inactive", "future"]
25+
}
2626
}
2727
```
28+
2829
```json
2930
{
30-
"task": "rebuild_missing_bounding_boxes",
31-
"payload": {
32-
"dry_run": true,
33-
"after_date": "2025-06-01"
34-
}
31+
"task": "rebuild_missing_bounding_boxes",
32+
"payload": {
33+
"dry_run": true,
34+
"after_date": "2025-06-01"
35+
}
3536
}
3637
```
38+
3739
```json
3840
{
39-
"task": "refresh_materialized_view",
40-
"payload": {
41+
"task": "refresh_materialized_view",
42+
"payload": {
4143
"dry_run": true
4244
}
4345
}
4446
```
4547

4648
To get the list of supported tasks use:
49+
4750
```json
4851
{
49-
"name": "list_tasks",
50-
"payload": {}
52+
"name": "list_tasks",
53+
"payload": {}
5154
}
5255
```
56+
5357
To update the geolocation files precision:
58+
5459
```json
5560
{
56-
"task": "update_geojson_files_precision",
57-
"payload": {
58-
"dry_run": true,
59-
"data_type": "gtfs",
60-
"precision": 5,
61-
"limit": 10
62-
}
61+
"task": "update_geojson_files_precision",
62+
"payload": {
63+
"dry_run": true,
64+
"data_type": "gtfs",
65+
"precision": 5,
66+
"limit": 10
67+
}
6368
}
64-
```
69+
```
70+
71+
To populate license rules:
72+
73+
```json
74+
{
75+
"task": "populate_license_rules",
76+
"payload": {
77+
"dry_run": true
78+
}
79+
}
80+
```

functions-python/tasks_executor/src/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
)
4141
from tasks.data_import.import_jbda_feeds import import_jbda_handler
4242

43+
from tasks.licenses.populate_license_rules import (
44+
populate_license_rules_handler,
45+
)
46+
4347
init_logger()
4448
LIST_COMMAND: Final[str] = "list"
4549
tasks = {
@@ -82,6 +86,10 @@
8286
"description": "Imports JBDA data into the system.",
8387
"handler": import_jbda_handler,
8488
},
89+
"populate_license_rules": {
90+
"description": "Populates license rules in the database from a predefined JSON source.",
91+
"handler": populate_license_rules_handler,
92+
},
8593
}
8694

8795

0 commit comments

Comments
 (0)