Skip to content

Conversation

@mverzilli
Copy link
Contributor

@mverzilli mverzilli commented Mar 5, 2025

Fixes #2283

The fix involves adding not_before and not_after fields to ChannelBroker.ask (aka, sms, btw why don't we rename this??), and honoring them (it was only sent with ChannelBroker.setup (aka, 'ivr', ditto).

The way to honor those fields involves:

  • Making sure they get also saved in the queue (previously only for IVR, nil for SMS)
  • Add expiration checks for SMS when ChannelBroker dequeues
  • Mark contact attempts as expired accordingly (so it gets picked up the next day)

Pending work:

  • Make it work
  • Make it nice (aka refactor)
  • Future proof (add some more test cases)
  • Update docs with new behaviors

Updated wiki:

https://github.com/instedd/surveda/wiki/Chart:-Start-Survey-(with-Channel-Broker)/565d79ddc3ac0b23f322a6584eac6604b533793e

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.

LGTM! 👍

@mverzilli mverzilli merged commit 83f8f28 into main Mar 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Respect Survey schedule when sending SMS messages

3 participants