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

Auto-reload Code during Development #87

Open
DavidYKay opened this issue Sep 28, 2012 · 6 comments
Open

Auto-reload Code during Development #87

DavidYKay opened this issue Sep 28, 2012 · 6 comments

Comments

@DavidYKay
Copy link

The one thing that I'm missing from Django is the ability to leave a Brubeck Python app up and let it reload the source code automatically as I'm writing it.

What do we need to do to implement this? Would be happy to dive into this, but I'm not sure where to start. Thanks!

@faruken
Copy link
Contributor

faruken commented Sep 28, 2012

Django's autoreload module may give an idea. Apparently they borrowed most of it from CherryPy.

https://github.com/django/django/blob/master/django/utils/autoreload.py

and here's CherryPy's autoreloader:

https://bitbucket.org/cherrypy/cherrypy/src/b0c48210b25018768532a370a522a660db6236f8/cherrypy/process/plugins.py#cl-540

@DavidYKay
Copy link
Author

Got it! Reading the code now. Will take a shot at this.

@DavidYKay
Copy link
Author

Sweet. I have a basic implementation working! Will start cleaning it up.

One issue: since Brubeck apps are invoked directly, while Django apps rely on manage.py runserver, should I ship this as an external tool, like manage.py? Or as a parameter in Brubeck.__init__()/Brubeck.run()?

Thanks for your patience! I'm new to this.

@lkraider
Copy link
Collaborator

I like the idea of a parameter, so I can define a debug var and the app launches in auto-reload, no debug var and it runs without it.

@kracekumar
Copy link
Collaborator

Well, there is an option in werkzeug to do this, currently I am working on
supporting multiple wsgi servers, I would suggest something to experiment
with already existing one and then integrate to brubeck when we have enough
knowledge. Anyways kudos to the idea

On Mon, Oct 29, 2012 at 10:09 PM, Paul Eipper [email protected]:

I like the idea of a parameter, so I can define a debug var and the app
launches in auto-reload, no debug var and it runs without it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/87#issuecomment-9875497.

Thanks & Regards

"Talk is cheap, show me the code" -- Linus Torvalds
kracekumar
www.kracekumar.com
*

@bdickason
Copy link
Contributor

@DavidYKay did you ever complete this implementation? I'm interested in auto-reload as well as I use it a bunch in nodejs development with the node-dev module.

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

5 participants