From 2b7d9d75db4b64af0c3adb691cb5a74c3c17a6af Mon Sep 17 00:00:00 2001 From: Jonas Jaszkowic Date: Thu, 1 Feb 2024 11:22:56 +0100 Subject: [PATCH] fix: upload weather.geojson to supabase --- harvester/Dockerfile | 2 +- harvester/harvester.py | 4 +++- harvester/{mapbox-tree-update.py => mapbox_tree_update.py} | 0 3 files changed, 4 insertions(+), 2 deletions(-) rename harvester/{mapbox-tree-update.py => mapbox_tree_update.py} (100%) diff --git a/harvester/Dockerfile b/harvester/Dockerfile index 3ee211be..9f519cb0 100644 --- a/harvester/Dockerfile +++ b/harvester/Dockerfile @@ -34,4 +34,4 @@ RUN git clone https://github.com/mapbox/tippecanoe.git && cd tippecanoe && make COPY . /app/ -CMD python /app/harvester.py && python /app/mapbox-tree-update.py +CMD python /app/harvester.py && python /app/mapbox_tree_update.py diff --git a/harvester/harvester.py b/harvester/harvester.py index ef9601ba..80cf638e 100644 --- a/harvester/harvester.py +++ b/harvester/harvester.py @@ -12,6 +12,7 @@ from dotenv import load_dotenv import logging import os +from mapbox_tree_update import upload_file_to_supabase_storage # setting up logging logging.basicConfig() @@ -307,7 +308,8 @@ def finishGeojson(feature_list, file_name): n = text_file.write(geojson) text_file.close() n = None - + upload_file_to_supabase_storage(path + file_name, file_name) + finishGeojson(features, "weather.geojson") finishGeojson(features_light, "weather_light.geojson") diff --git a/harvester/mapbox-tree-update.py b/harvester/mapbox_tree_update.py similarity index 100% rename from harvester/mapbox-tree-update.py rename to harvester/mapbox_tree_update.py