Commits

cleemesser committed ab45f47

make it it explicit that daemon mode and autoreload are not compatible

  • Participants
  • Parent commits 4f0de12

Comments (0)

Files changed (1)

django_wsgiserver/management/commands/runwsgiserver.py

   server_name=STRING    CherryPy's SERVER_NAME environ entry
                         Defaults to localhost
   daemonize=BOOL        whether to detach from terminal
-                        Defaults to False
+                        Defaults to False. This option is incompatible with autoreload
+                        currently.
   pidfile=FILE          write the spawned process-id to this file
   workdir=DIRECTORY     change to this directory when daemonizing
   threads=NUMBER        Number of threads for server to use
             return True
 
         if options['daemonize']:
+            options['autoreload'] = False # daemonize and autoreaload are not compatible currently
             if not options['pidfile']:
-                options['pidfile'] = '/var/run/cpwsgi_%s.pid' % options['port']
+                options['pidfile'] = '/var/run/django_wsgi_%s.pid' % options['port']
             stop_server(options['pidfile'])     
 
             from django.utils.daemonize import become_daemon
             fp.write("%d\n" % os.getpid())
             fp.close()
 
-        # autoreload is not implemented see cherrypy.process.autoreload or the django runserver
+        # autoreload 
         if options['autoreload']:
             import django.utils.autoreload
             django.utils.autoreload.main(self.start_server_servestatic, (options,))