File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/main/java/org/hibernate/infra/replicate/jira/service/jira/client Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,8 @@ public JiraIssueBulkResponse create(JiraIssueBulk bulk) {
154154
155155 @ Override
156156 public JiraIssueResponse update (String key , JiraIssue issue ) {
157- return withRetry (() -> delegate .update (key , issue ));
157+ // it might be that mapped user is wrong so we don't want to keep sending it
158+ return withRetry ( () -> delegate .update ( key , issue ), 2 );
158159 }
159160
160161 @ Override
@@ -258,8 +259,12 @@ private void withRetry(Runnable runnable) {
258259 }
259260
260261 private <T > T withRetry (Supplier <T > supplier ) {
262+ return withRetry ( supplier , RETRIES );
263+ }
264+
265+ private <T > T withRetry (Supplier <T > supplier , int retries ) {
261266 RuntimeException e = null ;
262- for (int i = 0 ; i < RETRIES ; i ++) {
267+ for (int i = 0 ; i < retries ; i ++) {
263268 try {
264269 return supplier .get ();
265270 } catch (RuntimeException exception ) {
You can’t perform that action at this time.
0 commit comments