Beispiel #1
0
 internal async Task <ActivityResponse> ExecuteAsync(ActivityArgs activityArgs)
 {
     try
     {
         Hearbeat.SetFallbackErrorHandler(_errorHandler);
         Hearbeat.StartHeartbeatIfEnabled(_heartbeatApi, activityArgs.TaskToken);
         var retryableFunc = new RetryableFunc(_errorHandler);
         return(await retryableFunc.ExecuteAsync(() => ExecuteActivityMethod(activityArgs), Defer));
     }
     finally
     {
         Hearbeat.StopHeartbeat();
     }
 }
Beispiel #2
0
 internal async Task SendDecisionsAsync(string taskToken, IEnumerable <WorkflowDecision> decisions)
 {
     var retryAbleFunc = new RetryableFunc(_responseErrorHandler);
     await retryAbleFunc.ExecuteAsync(() => SendDecisionsToAmazonSwfAsync(taskToken, decisions));
 }
Beispiel #3
0
        private WorkflowDecision [] Perform(WorkflowEventsExecution execution)
        {
            var retryableAction = new RetryableFunc(_executionErrorHandler);

            return(retryableAction.Execute(() => execution.Execute().ToArray(), EmptyDecisions));
        }
Beispiel #4
0
        private WorkflowDecision[] Perform(Func <IEnumerable <WorkflowDecision> > decisions)
        {
            var retryableAction = new RetryableFunc(_executionErrorHandler);

            return(retryableAction.Execute(() => decisions().ToArray(), EmptyDecisions));
        }