Skip to content

Commit

Permalink
workflow rate limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Dec 1, 2023
1 parent 4f72063 commit 83a33d5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
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

0 comments on commit 83a33d5

Please sign in to comment.