Skip to content

Commit

Permalink
add try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
sdobbert authored and sdobbert committed Mar 5, 2024
1 parent e10176e commit 9b675ee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/dataset-archive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,14 @@ const archiveWorker = async (workerJob, inputs) => {
const filePath = `${finalDatadir}/${region}/${region}_temperature/${fileToArchive}`

const curlCmd = `curl --user ${iorUser}:${iorPass} -s -S -X POST -H "Content-type: application/zip" -d @${filePath} ${iorPath}?file_name=${fileToArchive}`;

return await execShellCommand(curlCmd);
try {
await execShellCommand(curlCmd);
logger.info("Successfuly excuted cURL command.");
}
catch {
logger.debug("Could not execute cURL command.");
}
}
};
// clean up files that are older than 49 hours
const datatype = [
Expand Down

0 comments on commit 9b675ee

Please sign in to comment.