Skip to content

Commit

Permalink
IWF-257: updating comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Katie Atrops committed Jan 13, 2025
1 parent c119d8a commit 3be7799
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
24 changes: 12 additions & 12 deletions service/interpreter/signalReceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func NewSignalReceiver(
persistenceManager: persistenceManager,
}

//Starts a new thread that loops forever. The thread waits until a FailWorkflowSignalChannelName signal has been
//received or a continueAsNew run is triggered. Once a signal has been received it sets
//The thread waits until a FailWorkflowSignalChannelName signal has been
//received or a continueAsNew run is triggered. When a signal has been received it sets
//SignalReceiver.failWorkflowByClient to true and sets SignalReceiver.reasonFailWorkflowByClient to the reason
//given in the signal's value. If continueIsNew is triggered, the thread completes after all signals have been processed.
provider.GoNamed(ctx, "fail-workflow-system-signal-handler", func(ctx UnifiedContext) {
Expand Down Expand Up @@ -71,8 +71,8 @@ func NewSignalReceiver(
}
})

//Starts a new thread that loops forever. The thread waits until a SkipTimerSignalChannelName signal has been
//received or a continueAsNew run is triggered. Once a signal has been received it skips the specific timer
//The thread waits until a SkipTimerSignalChannelName signal has been
//received or a continueAsNew run is triggered. When a signal has been received it skips the specific timer
//described in the signal's value. If continueIsNew is triggered, the thread completes after all signals have been processed.
provider.GoNamed(ctx, "skip-timer-system-signal-handler", func(ctx UnifiedContext) {
for {
Expand All @@ -98,8 +98,8 @@ func NewSignalReceiver(
}
})

//Starts a new thread that loops forever. The thread waits until a UpdateConfigSignalChannelName signal has been
//received or a continueAsNew run is triggered. Once a signal has been received it updates the workflow config
//The thread waits until a UpdateConfigSignalChannelName signal has been
//received or a continueAsNew run is triggered. When a signal has been received it updates the workflow config
//defined in the signal's value. If continueIsNew is triggered, the thread completes after all signals have been processed.
provider.GoNamed(ctx, "update-config-system-signal-handler", func(ctx UnifiedContext) {
for {
Expand All @@ -125,8 +125,8 @@ func NewSignalReceiver(
}
})

//Starts a new thread that loops forever. The thread waits until a TriggerContinueAsNewSignalChannelName signal has
//been received or a continueAsNew run is triggered. Once a signal has been received it triggers a continueAsNew run.
//The thread waits until a TriggerContinueAsNewSignalChannelName signal has
//been received or a continueAsNew run is triggered. When a signal has been received it triggers a continueAsNew run.
//Since this thread is triggering a continueAsNew run it doesn't need to wait for signals to drain from the channel.
provider.GoNamed(ctx, "trigger-continue-as-new-handler", func(ctx UnifiedContext) {
// NOTE: unlike other signal channels, this one doesn't need to drain during continueAsNew
Expand All @@ -148,8 +148,8 @@ func NewSignalReceiver(
return
})

//Starts a new thread that loops forever. The thread waits until a ExecuteRpcSignalChannelName signal has been
//received or a continueAsNew run is triggered. Once a signal has been received it upserts data objects
//The thread waits until a ExecuteRpcSignalChannelName signal has been
//received or a continueAsNew run is triggered. When a signal has been received it upserts data objects
//(if they exist in the signal value), upserts search attributes (if they exist in the signal value),
//and/or publishes a message to an internal channel (if InterStateChannelPublishing is set in the signal value).
//If continueIsNew is triggered, the thread completes after all signals have been processed.
Expand Down Expand Up @@ -182,8 +182,8 @@ func NewSignalReceiver(
}
})

//Starts a new thread that loops forever. The thread waits until a signal has been received that is not an IWF
//system signal name or a continueAsNew run is triggered. Once a signal has been received it processes the
//The thread waits until a signal has been received that is not an IWF
//system signal name or a continueAsNew run is triggered. When a signal has been received it processes the
//external signal. If continueIsNew is triggered, the thread completes after all signals have been processed.
provider.GoNamed(ctx, "user-signal-receiver-handler", func(ctx UnifiedContext) {
for {
Expand Down
13 changes: 11 additions & 2 deletions service/interpreter/temporal/workflowProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ func (w *workflowProvider) ExecuteActivity(
valuePtr interface{}, optimizeByLocalActivity bool,
ctx interpreter.UnifiedContext, activity interface{}, args ...interface{},
) (err error) {
logger := w.GetLogger(ctx)
wfCtx, ok := ctx.GetContext().(workflow.Context)
if !ok {
panic("cannot convert to temporal workflow context")
Expand All @@ -264,12 +265,20 @@ func (w *workflowProvider) ExecuteActivity(
err = f.Get(wfCtx, valuePtr)
if err != nil {
f = workflow.ExecuteActivity(wfCtx, activity, args...)
return f.Get(wfCtx, valuePtr)
err = f.Get(wfCtx, valuePtr)
if err != nil {
logger.Info("activity failed!!!!!!!!!!!!!!!!")
}
return
}
return err
}
f := workflow.ExecuteActivity(wfCtx, activity, args...)
return f.Get(wfCtx, valuePtr)
err = f.Get(wfCtx, valuePtr)
if err != nil {
logger.Info("activity failed!!!!!!!!!!!!!!!!")
}
return
}

func (w *workflowProvider) Now(ctx interpreter.UnifiedContext) time.Time {
Expand Down

0 comments on commit 3be7799

Please sign in to comment.