Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix workflow start options #68

Merged
merged 2 commits into from
Nov 18, 2022
Merged

fix workflow start options #68

merged 2 commits into from
Nov 18, 2022

Conversation

duoertai
Copy link
Collaborator

@duoertai duoertai commented Nov 16, 2022

tested with cron schedule
tested with different workflow reuse id policy

@@ -11,21 +11,16 @@ public static WorkflowStartOptions.WorkflowIDReusePolicyEnum toGenerated(
return WorkflowStartOptions.WorkflowIDReusePolicyEnum.ALLOW_DUPLICATE_FAILED_ONLY;
}
switch (workflowIdReusePolicy) {
case ALLOW_DUPLICATE_FAILED_ONLY -> {
case ALLOW_DUPLICATE_FAILED_ONLY:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be compatible with java 8

@Value.Immutable
public abstract class WorkflowStartOptions {
public abstract Integer getWorkflowTimeoutSeconds();

@Nullable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, how about let's use Optional, because:

  • we are using it already so it's better to keep consistent
  • Optional is more explicit and friendly IMO for caller to know this field could be null

@duoertai duoertai merged commit 3dd1155 into main Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants