ソースを参照

Make sure conf.humanize() evaluates configuration. Closes #3652

Ask Solem 8 年 前
コミット
cefd84a4f3
1 ファイル変更10 行追加0 行削除
  1. 10 0
      celery/app/utils.py

+ 10 - 0
celery/app/utils.py

@@ -163,9 +163,19 @@ class Settings(ConfigurationView):
         """
         return self['_'.join(part for part in parts if part)]
 
+    def finalize(self):
+        # See PendingConfiguration in celery/app/base.py
+        # first access will read actual configuration.
+        try:
+            self['__bogus__']
+        except KeyError:
+            pass
+        return self
+
     def table(self, with_defaults=False, censored=True):
         filt = filter_hidden_settings if censored else lambda v: v
         dict_members = dir(dict)
+        self.finalize()
         return filt({
             k: v for k, v in items(
                 self if with_defaults else self.without_defaults())