-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🤫 Add support for passive flows #393
Conversation
Codecov Report
@@ Coverage Diff @@
## master #393 +/- ##
==========================================
- Coverage 55.03% 55.02% -0.01%
==========================================
Files 113 113
Lines 7912 7913 +1
==========================================
Hits 4354 4354
- Misses 2863 2864 +1
Partials 695 695
Continue to review full report at Codecov.
|
core/runner/runner.go
Outdated
@@ -226,7 +226,7 @@ func StartFlowBatch( | |||
options := NewStartOptions() | |||
options.RestartParticipants = batch.RestartParticipants() | |||
options.IncludeActive = batch.IncludeActive() | |||
options.Interrupt = true | |||
options.Interrupt = flow.FlowType() != models.FlowTypePassive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So could still surface exclude_active/include_active in the UI for passive flows.. the flow type only determines whether we interrupt or not if you do include active contacts. Not completely sure that's useful but this leaves the door open.
flows.FlowTypeVoice: IVRFlow, | ||
flows.FlowTypeMessagingOffline: SurveyorFlow, | ||
flows.FlowTypeMessaging: FlowTypeMessaging, | ||
flows.FlowTypeMessagingPassive: FlowTypePassive, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor but wonder if PassiveMessaging
might be a bit better? It is still messaging after all. (only say this because the type does still imply the medium, which in this case is still messaging)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then I start thinking why don't they match the engine types.. why FlowTypeSurveyor
over FlowTypeMessagingOffline
.. so I convinced myself to just let these match the database codes M, V, P, S
core/runner/runner.go
Outdated
@@ -226,7 +226,7 @@ func StartFlowBatch( | |||
options := NewStartOptions() | |||
options.RestartParticipants = batch.RestartParticipants() | |||
options.IncludeActive = batch.IncludeActive() | |||
options.Interrupt = true | |||
options.Interrupt = flow.FlowType() != models.FlowTypePassive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternate random idea: FlowType
has an Interrupt()
on it so this just becomes flow.FlowType().Interrupt()
Just a thought though.
Update sentry and slog support library
Not much to do here as we already have the concept of not interrupting sessions from campaign single-message flows