Skip to content

Commit

Permalink
Fix upload errors for simulations
Browse files Browse the repository at this point in the history
Sometimes simulations won't upload the `cmd` directory, causing
errors. The `mirror` cmd seems to not work when a parent directory
doesn't exist. This makes the parent directory and then mirrors before
upload, fixing the issue.
  • Loading branch information
bohde committed Feb 22, 2017
1 parent 23f8880 commit 5b45826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reco-jarvice/reco-jarvice
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function build {
function test-cmd {
JOB=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 16 | head -n 1)

lftp "sftp://$USERNAME:$API_KEY@drop.jarvice.com" -e "set sftp:auto-confirm yes; mirror --reverse --exclude .reco-work -P4 $PWD/ tmp/tests/$JOB; quit" 1>&2
lftp "sftp://$USERNAME:$API_KEY@drop.jarvice.com" -e "set sftp:auto-confirm yes; mkdir tmp/tests/$JOB; mirror --reverse --exclude .reco-work -P4 $PWD/ tmp/tests/$JOB; quit" 1>&2

JSON=$(jq ".application.parameters.command = \"/data/reco/$VERSION/workflows/simulate.sh $JOB $*\" | .job_label = \"simulate:$JOB\" | .user.username = \"$USERNAME\" | .user.apikey = \"$API_KEY\"" < "$DIR/batch.json")
JOB_DATA=$(jarvice_cli -username "$USERNAME" -apikey "$API_KEY" submit -j "$JSON")
Expand Down

0 comments on commit 5b45826

Please sign in to comment.