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

workflow rate limiter #248

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ public boolean isSuccessful() {
private List<Workflow> history = new LinkedList<>();

private String idempotencyKey;
private String rateLimitKey;
private boolean rateLimited;

public Workflow() {}

public String getIdempotencyKey() {
return idempotencyKey;
Expand All @@ -136,6 +140,22 @@ public void setIdempotencyKey(String idempotencyKey) {
this.idempotencyKey = idempotencyKey;
}

public String getRateLimitKey() {
return rateLimitKey;
}

public void setRateLimitKey(String rateLimitKey) {
this.rateLimitKey = rateLimitKey;
}

public boolean isRateLimited() {
return rateLimited;
}

public void setRateLimited(boolean rateLimited) {
this.rateLimited = rateLimited;
}

public List<Workflow> getHistory() {
return history;
}
Expand All @@ -144,8 +164,6 @@ public void setHistory(List<Workflow> history) {
this.history = history;
}

public Workflow() {}

/**
* @return the status
*/
Expand Down
18 changes: 18 additions & 0 deletions core/src/main/java/com/netflix/conductor/model/WorkflowModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public boolean isSuccessful() {

private Status previousStatus;
private String idempotencyKey;
private String rateLimitKey;
private boolean rateLimited;

private List<WorkflowModel> history = new LinkedList<>();

Expand Down Expand Up @@ -458,6 +460,22 @@ public void setIdempotencyKey(String idempotencyKey) {
this.idempotencyKey = idempotencyKey;
}

public String getRateLimitKey() {
return rateLimitKey;
}

public void setRateLimitKey(String rateLimitKey) {
this.rateLimitKey = rateLimitKey;
}

public boolean isRateLimited() {
return rateLimited;
}

public void setRateLimited(boolean rateLimited) {
this.rateLimited = rateLimited;
}

public void externalizeInput(String path) {
this.inputPayload = this.input;
this.input = new HashMap<>();
Expand Down