progrium / ginkgo

Python service microframework
http://ginkgo.readthedocs.org
MIT License
325 stars 51 forks source link

should Service be a state machine? #22

Closed progrium closed 12 years ago

progrium commented 12 years ago

I've gone back and forth about this. Imagine a service with these states:

The require_ready decorator would wait for the ready state (although it could already do this). There could be a wait_for(state) method. Services could go out of ready state.

This is a more general solution to the issue here: https://github.com/progrium/gservice/issues/21

progrium commented 12 years ago

I think we decided yes to this. Here is an example: https://gist.github.com/1435968