Browse Source

Use format :#x

Ask Solem 10 years ago
parent
commit
740f017429
2 changed files with 2 additions and 2 deletions
  1. 1 1
      celery/app/utils.py
  2. 1 1
      celery/apps/worker.py

+ 1 - 1
celery/app/utils.py

@@ -47,7 +47,7 @@ HIDDEN_SETTINGS = re.compile(
 
 def appstr(app):
     """String used in __repr__ etc, to id app instances."""
-    return '{0}:0x{1:x}'.format(app.main or '__main__', id(app))
+    return '{0}:{1:#x}'.format(app.main or '__main__', id(app))
 
 
 class Settings(ConfigurationView):

+ 1 - 1
celery/apps/worker.py

@@ -206,7 +206,7 @@ class Worker(WorkController):
     def startup_info(self):
         app = self.app
         concurrency = string(self.concurrency)
-        appr = '{0}:0x{1:x}'.format(app.main or '__main__', id(app))
+        appr = '{0}:{1:#x}'.format(app.main or '__main__', id(app))
         if not isinstance(app.loader, AppLoader):
             loader = qualname(app.loader)
             if loader.startswith('celery.loaders'):