-
Notifications
You must be signed in to change notification settings - Fork 35
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
Question: Is it possible to set a dynamic wait
value?
#260
Comments
Hi @kimili. I'm guessing the issue is that it doesn't currently support the lambda/block syntax, but since it's returning a duration that can be converted to an integer, I don't see why we can't make this work. I'd accept a PR for it, or otherwise I'll take a look when I have some spare time. Thanks! |
Oops, I think I misspoke. I recall investigating this in the past, and I'm pretty sure Heya's design will make this impossible. The problem is that since the durations are actually embedded in the scheduler query, we don't have the (Note: while the |
Btw, the way we handle this at Honeybadger is I have a |
So, I'd like to be able to set a dynamic
wait:
value on a campaign step. Basically, in the app I'm integrating Heya into, it starts with a 7 day free trial. But by using certain features, users can extend their trials by up to 14 days. I'd like to start a new campaign when a user starts their first extra day, which has 2 steps - One that gets sent right away, and the other that gets sent at the end of their trial. Since the trial end date can change over time, how can I handle sending that second step at the correct time? Here's what I'm trying for that campaign:Of course, the
wait:
value is expecting anActiveSupport::Duration
object (e.g.3.days
). But in that case I'm seeing this error:The relevant stack trace points to the
build_arel
function in/lib/heya/active_record_extension.rb
Any thoughts on how to make this situation work?
The text was updated successfully, but these errors were encountered: