Browse Source

celeryd now emits a warning if running as root

Ask Solem 14 years ago
parent
commit
56f2a44058
1 changed files with 4 additions and 0 deletions
  1. 4 0
      celery/apps/worker.py

+ 4 - 0
celery/apps/worker.py

@@ -77,6 +77,10 @@ class Worker(object):
         self.redirect_stdouts_to_logger()
         print("celery@%s v%s is starting." % (self.hostname, __version__))
 
+        if getattr(os, "geteuid", None) and os.geteuid() == 0:
+            warnings.warn(
+                "Running celeryd with superuser privileges is not encouraged!")
+
         if self.discard:
             self.purge_messages()