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

State transition on timed event? #266

Open
nigel-lowry opened this issue Jul 5, 2013 · 1 comment
Open

State transition on timed event? #266

nigel-lowry opened this issue Jul 5, 2013 · 1 comment

Comments

@nigel-lowry
Copy link

(Since Github updated their UI I can't work out how to search the issues anymore so I apologise if this is a duplicate.)

Does this gem support firing a state transition in response to a certain instance of time passing? For example, if I had an auction which ends on Sunday night at 9pm, does this gem support changing the state of the auction from 'open' to 'closed' when the end time is reached?

I can see other ways of achieving the same thing by having a periodic job that checks through all 'open' auctions and closes them, but just wanted to know if this gem supported something similar already.

@hadees
Copy link

hadees commented Jul 8, 2013

I would also like a feature like this. I'm working on an e-commerce site and I'd like to have a prelaunch state that changes to launched when the product goes on sale.

The only way I could think of doing it with out using some sort of delayed job would be for state machine to be smart enough to switch the state retroactively the next time it is checked. That seems like a poor option though.

Maybe what we really need is an example showing the best practices for this.

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

No branches or pull requests

2 participants