| src | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
Updates the pipeline facility geolocations
A function that updates the pipeline facilities with their geolocation based on the pipeline route. Fails if there is no pipeline route.
Input
Arguments
pipeline_id: astringwhich should be a valid uuid for a pipeline.
Environment
ORG_ID: the organization idPROJECT_ID: the id of the data project where the pipeline data is foundENV: the environment of the platform e.g.devorstgetc.
Creating the function on the platform
To create this function on the platform using the cli set up the port forwarding as shown in README.
Then run the following command to create the function.
cargo run functions create \
-f functions/facility_locations \
-n facilitylocations \
-d "Update the facility locations based on the pipeline route and log distance" \
-i pipeline_id=string
Testing the function locally
You can run and test the function locally by running
cargo run
Then you can check it work with curl as follows
curl -X POST localhost:8080 -v \
-d "\"{\\\"pipeline_id\\\": \\\"0195a527-f16b-7d83-b936-35bc2dd92f9d\\\"}\""