File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 5555SOURCE_LOGGER .setLevel (logging .DEBUG )
5656GOOGLE_STORAGE_URL = 'https://storage.googleapis.com'
5757TRUSTED_BUCKET = f'{ GOOGLE_STORAGE_URL } /natcap-data-cache'
58- TARGET_BUCKET_PATH = 'jupyter-app-temp-storage/clipped '
59- TARGET_FILE_BUCKET = f'gs:// { TARGET_BUCKET_PATH } '
60- TARGET_BUCKET_URL = f'{ GOOGLE_STORAGE_URL } /{ TARGET_BUCKET_PATH } '
58+ TARGET_FILE_BUCKET = 'gs:// jupyter-app-temp-storage'
59+ TARGET_BUCKET_SUBDIR = 'clipped '
60+ TARGET_BUCKET_URL = f'{ GOOGLE_STORAGE_URL } /jupyter-app-temp-storage/ { TARGET_BUCKET_SUBDIR } '
6161WORKSPACE_DIR = os .environ .get ('WORKSPACE_DIR' , os .getcwd ())
6262app .logger .info ("WORKSPACE_DIR: %s" , WORKSPACE_DIR )
6363pygeoprocessing .geoprocessing ._LOGGING_PERIOD = 1.0
@@ -363,7 +363,7 @@ def clip():
363363 bucketname = re .sub ('^gs://' , '' , TARGET_FILE_BUCKET )
364364 storage_client = storage .Client ()
365365 bucket = storage_client .bucket (bucketname )
366- blob = bucket .blob (bucket_filename )
366+ blob = bucket .blob (f" { TARGET_BUCKET_SUBDIR } / { bucket_filename } " )
367367 blob .upload_from_filename (target_file_path )
368368 except Exception :
369369 app .logger .exception ("Falling back to cmdline gsutil" )
You can’t perform that action at this time.
0 commit comments