Skip to content

Commit

Permalink
Merge pull request #70 from EBISPOT/ftp_as_shared_storage
Browse files Browse the repository at this point in the history
trigger the ftp logic with env var, dirnames are just gcsts
  • Loading branch information
jdhayhurst authored Jun 3, 2020
2 parents e5cf352 + 21a41d2 commit e7833dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sumstats_service/resources/api_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def validate_files_from_payload(callback_id, content):
content = json.dumps(content).translate(str.maketrans({'"': '\\"'}))
bsub_com = 'singularity exec --bind {sp} docker://{image}:{tag} validate-payload -cid {cid} -out {outfile} -storepath {sp} -ftpserver {ftps} -ftpuser {ftpu} -ftppass {ftpp} -payload \'{content}\''.format(
image=config.SINGULARITY_IMAGE, tag=config.SINGULARITY_TAG, cid=callback_id, outfile=outfile, sp=config.STORAGE_PATH, ftps=config.FTP_SERVER, ftpu=config.FTP_USERNAME, ftpp=config.FTP_PASSWORD, content=content)
command = 'export http_proxy={hp}; export https_proxy={hsp}; mkdir -p {pd}; bsub -oo {pd}/stdout -eo {pd}/stderr -M {mem} -R "rusage[mem={mem}]" "{bsub_com}"'.format(
pd=par_dir, q=config.COMPUTE_FARM_QUEUE, mem=memory, bsub_com=bsub_com, hp=config.REMOTE_HTTP_PROXY, hsp=config.REMOTE_HTTPS_PROXY)
command = 'export http_proxy={hp}; export https_proxy={hsp}; export VALIDATE_WITH_SSH={ssh} mkdir -p {pd}; bsub -oo {pd}/stdout -eo {pd}/stderr -M {mem} -R "rusage[mem={mem}]" "{bsub_com}"'.format(
pd=par_dir, q=config.COMPUTE_FARM_QUEUE, mem=memory, bsub_com=bsub_com, hp=config.REMOTE_HTTP_PROXY, hsp=config.REMOTE_HTTPS_PROXY, ssh=config.VALIDATE_WITH_SSH)
logger.debug('command:\n{}'.format(command))
stdin, stdout, stderr = ssh.exec_command(command)
jobid = ssh.parse_jobid(stdout)
Expand Down

0 comments on commit e7833dc

Please sign in to comment.