microsoft / microsoft/durabletask-java
Incorrect retry count returned in case of Activity Function
未關閉
@kaibocai 已經在處理了。
開始於 2023年9月27日。
Enhancement
need investigation
P2
- 主要語言
- Java
- 星號
- 29
- 分支
- 18
- 平均合併
- 1 天 10 小時
- 30 天內合併 PR
- 2
描述
I have an Activity Function which has a retry count set to 3. This is intentionally made to throw an exception and retry. Now, I am trying to get the retry count in the Activity Function but it always returns 0.
Here is a sample code I am trying :
public String aepHTTPPollingOperator(@DurableActivityTrigger(name = "input", dataType = "string") String input,
ExecutionContext context) throws JsonMappingException, JsonProcessingException, Exception {
System.out.println("Context Retry : " + context.getRetryContext().getRetrycount()); //always prints 0
throw new RuntimeException("test exception")
}
This is how I am calling this activity :
RetryPolicy policy = new RetryPolicy(3, 30);
TaskOptions options = new TaskOptions(policy);
ctx.callActivity("ActivityName", activityInputQO.toString(), options, String.class));
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
評估
這個 Issue 還沒有評估資料。