Closed tehnrd closed 2 years ago
This looks like it would definitely work, but the need to capture mirrorJobId
and conditionally do stuff later based on it really makes me feel like the current structure is falling down. It wasn't particularly easy to follow the flow before, and I think that this affects readability negatively.
My gut suggests that refactoring away from using the async
library to using async
/ await
would clean things up tremendously and facilitate this use-case more effectively.
How would you feel about giving that refactor a shot?
Cool, ya, and totally agree with the async approach. It took me a while to wrap my head around it and I didn't feel great about storing the mirrorJobId
outside the async function.
I can definitely take a look at incorporating async
and await
approach. Might be a little slower on the new PR as ramping down on the project that involved this so I'll have to squeeze it in when I have some time.
Sounds good. Thanks!
Definitely open to feedback on this but this PR would populate
pbf/planet-latest.osm.pbf
file in the osm-pds s3 bucket.I think it's important for it to be a static path that will not change as this will greatly simplify writing scripts that require the latest planet.pbf file rather than inspecting the contents of the bucket and trying to figure out which file is the latest.