0

I am working a project, that creates an django app over a request. Since the webserver apache needs to be restarted to add new files created. I tried following:

1) Django request_complete Signals: This is not good way because I dont want my server to be restarting on every request complete

2) threading.Time:I tried to run a function with some delay so that it allows complete the current request.

This is not working giving following error:

RuntimeError at /apps/37f63340-2984-40b1-a728-1cf3d0820ae6/
threads can only be started once  

Please suggest me way to solve this problem.

Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134
Amar
  • 666
  • 5
  • 13
  • You just want to restart apache2 ? If yes, you have to do : `sudo service apache2 restart` – Essex Mar 02 '17 at 08:14

1 Answers1

0

You tagged this with "webfaction" so I'm going to assume you're using WebFaction's default mod_wsgi setup.

If that's the case, then you can restart the mod_wsgi daemon processes, instead of restarting Apache itself, as described in the mod_wsgi documentation: Reloading Source Code

Sean F
  • 817
  • 9
  • 20