Skip to content

Commit

Permalink
refactor: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfouquet committed Aug 14, 2024
1 parent bd5f99a commit 239c19b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions templates/common/exit.handler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ spec:
{{= inputs.parameters.workflow_parameters }}.forEach((pair) => (parameters[pair.name] = pair.value));
function guessWorkflowGroup() {
if (parameters['source'] === undefined) {
const source = parameters['source'];
if (!source) {
return 'unknown';
}
if (parameters['source'].startsWith('s3://linz-topographic-upload')) {
if (source.startsWith('s3://linz-topographic-upload')) {
return 'land';
}
if (parameters['source'].startsWith('s3://linz-hydrographic-upload')) {
if (source.startsWith('s3://linz-hydrographic-upload')) {
return 'sea';
}
return 'unknown';
Expand Down

0 comments on commit 239c19b

Please sign in to comment.