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 with manage.py runfcgi #35

Open
francescortiz opened this issue Apr 2, 2012 · 3 comments
Open

Auto reload with manage.py runfcgi #35

francescortiz opened this issue Apr 2, 2012 · 3 comments

Comments

@francescortiz
Copy link

Is there a way to have rosetta reload translations when started with manage.py runfcgi?

I have tried with
ROSETTA_WSGI_AUTO_RELOAD = True
and
ROSETTA_UWSGI_AUTO_RELOAD = True

with no luck.

Thank you.

@mbi
Copy link
Owner

mbi commented Jun 7, 2012

If you could point me to the right way to reload the runfcgi process I'll gladly integrate this.

@francescortiz
Copy link
Author

This is what I did:

from rosetta.signals import post_save

def restart_instance(*args, **kwargs):
    from subprocess import call
    call(["/home/username/init/django", "restartdelay"])

post_save.connect(restart_instance)

and the restarday option of the daemon waits one second to restart the django instance

$(sleep 1; /home/username/init/django stop; /home/username/init/django start) &

@francescortiz
Copy link
Author

So, there is no right way, just a solution for every case

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