Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed Sep 23, 2024
1 parent 0798a66 commit e662935
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions feedstock/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ class Transfer(beam.PTransform):

def transfer(self, source_store) -> str:
import os
target_store = target_store(1)
logger.debug(f'transfer from {source_store} to {self.target_store}')
print(self.target_store)
target_store = self.target_store(1)

# ToDo: Fix input store path from gcs to s3.
from google.cloud import secretmanager
client = secretmanager.SecretManagerServiceClient()
Expand All @@ -44,13 +43,13 @@ def transfer(self, source_store) -> str:
os.environ["aws_access_key_id"] = aws_id
os.environ["aws_secret_access_key"] = aws_secret

command = f"s5cmd --endpoint-url https://nyu1.osn.mghpcc.org {source_store} {self.target_store}"
command = f"s5cmd --endpoint-url https://nyu1.osn.mghpcc.org {source_store} {target_store}"
logger.warn(command)

ls_out = subprocess.run(command, shell=True, capture_output=True, text=True)
logger.warn(ls_out)
del client
return self.target_store
return target_store


def expand(self, pcoll: beam.PCollection) -> beam.PCollection:
Expand Down

0 comments on commit e662935

Please sign in to comment.