Skip to content
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

Fix: channel broker must report expiration to survey #2298

Merged

Conversation

ysbaddaden
Copy link
Contributor

The channel broker no longer sends all messages to the external service, so when contacts expire, we'll no longer receive an expiration notice from the service.

The channel broker thus needs to report the expiration internally, so the respondents can be properly rescheduled properly.

The channel broker no longer sends all messages to the external service,
so when contacts expire, we'll no longer receive an expiration notice
from the service.

The channel broker thus needs to report the expiration internally, so
the respondents can be properly rescheduled properly.
@ysbaddaden ysbaddaden added the bug label Aug 29, 2023
@ysbaddaden ysbaddaden self-assigned this Aug 29, 2023
@@ -426,6 +426,7 @@ defmodule Ask.Runtime.ChannelBroker do
{respondent, token, not_before, not_after} ->
cond do
expired_call?(not_after) ->
Ask.Runtime.Survey.contact_attempt_expired(respondent)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just calling here what Ask.Runtime.VerboiceChannel.callback/2 calls when a message has expired.

@ysbaddaden ysbaddaden added this to the 0.37.1 milestone Aug 29, 2023
@ysbaddaden ysbaddaden linked an issue Aug 29, 2023 that may be closed by this pull request
Copy link
Member

@matiasgarciaisaia matiasgarciaisaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great one!

As we discussed, this whole "let the survey broker that the call expired to extend its expiration date" seems like a bit of a hack, but it's the way we're currently doing it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do expired contacts in the channel-broker consume retries? ChannelBroker doesn't report contacts it expires
2 participants