Skip to content

Commit

Permalink
Parse integer
Browse files Browse the repository at this point in the history
  • Loading branch information
nohup23 committed Sep 11, 2023
1 parent 7c88662 commit df0bb68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.orkes.samples.workers;

import com.amazonaws.regions.Regions;
import com.google.common.primitives.Doubles;
import com.netflix.conductor.client.worker.Worker;
import com.netflix.conductor.common.metadata.tasks.Task;
import com.netflix.conductor.common.metadata.tasks.TaskResult;
Expand Down Expand Up @@ -29,8 +30,10 @@ public TaskResult execute(Task task) {

try {
String fileLocation = (String) task.getInputData().get("fileLocation");
Integer width = (Integer) task.getInputData().get("outputWidth");
Integer height = (Integer) task.getInputData().get("outputHeight");
Integer width = Doubles.tryParse(task.getInputData().get("outputWidth").toString()).intValue();

Integer height = Doubles.tryParse(task.getInputData().get("outputHeight").toString()).intValue();


String outputFormat = (String) task.getInputData().get("outputFormat");

Expand Down
5 changes: 2 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
conductor.server.url=https://play.orkes.io/api

conductor.security.client.key-id=_CHANGE_ME_
conductor.security.client.secret=_CHANGE_ME_

conductor.security.client.key-id=b274eb68-0630-4d82-b8ff-266d3f137344
conductor.security.client.secret=yRpxiEOa4tFF9 iKlNFXyUf9V437KbuUQSYvvHW5GuSf7LL8o

0 comments on commit df0bb68

Please sign in to comment.