|
@@ -6,16 +6,17 @@ from sys import exit, stderr
|
|
from celery.app.defaults import NAMESPACES, flatten
|
|
from celery.app.defaults import NAMESPACES, flatten
|
|
|
|
|
|
ignore = frozenset([
|
|
ignore = frozenset([
|
|
- "CELERYD_POOL_PUTLOCKS",
|
|
|
|
- "BROKER_HOST",
|
|
|
|
- "BROKER_USER",
|
|
|
|
- "BROKER_PASSWORD",
|
|
|
|
- "BROKER_VHOST",
|
|
|
|
- "BROKER_PORT",
|
|
|
|
- "CELERY_REDIS_HOST",
|
|
|
|
- "CELERY_REDIS_PORT",
|
|
|
|
- "CELERY_REDIS_DB",
|
|
|
|
- "CELERY_REDIS_PASSWORD",
|
|
|
|
|
|
+ 'CELERYD_AGENT',
|
|
|
|
+ 'CELERYD_POOL_PUTLOCKS',
|
|
|
|
+ 'BROKER_HOST',
|
|
|
|
+ 'BROKER_USER',
|
|
|
|
+ 'BROKER_PASSWORD',
|
|
|
|
+ 'BROKER_VHOST',
|
|
|
|
+ 'BROKER_PORT',
|
|
|
|
+ 'CELERY_REDIS_HOST',
|
|
|
|
+ 'CELERY_REDIS_PORT',
|
|
|
|
+ 'CELERY_REDIS_DB',
|
|
|
|
+ 'CELERY_REDIS_PASSWORD',
|
|
])
|
|
])
|
|
|
|
|
|
|
|
|
|
@@ -23,7 +24,7 @@ def is_ignored(setting, option):
|
|
return setting in ignore or option.deprecate_by
|
|
return setting in ignore or option.deprecate_by
|
|
|
|
|
|
|
|
|
|
-def find_undocumented_settings(directive=".. setting:: "):
|
|
|
|
|
|
+def find_undocumented_settings(directive='.. setting:: '):
|
|
settings = dict(flatten(NAMESPACES))
|
|
settings = dict(flatten(NAMESPACES))
|
|
all = set(settings)
|
|
all = set(settings)
|
|
documented = set(line.strip()[len(directive):].strip()
|
|
documented = set(line.strip()[len(directive):].strip()
|
|
@@ -33,12 +34,12 @@ def find_undocumented_settings(directive=".. setting:: "):
|
|
if not is_ignored(setting, settings[setting])]
|
|
if not is_ignored(setting, settings[setting])]
|
|
|
|
|
|
|
|
|
|
-if __name__ == "__main__":
|
|
|
|
- sep = """\n * """
|
|
|
|
|
|
+if __name__ == '__main__':
|
|
|
|
+ sep = '\n * '
|
|
missing = find_undocumented_settings()
|
|
missing = find_undocumented_settings()
|
|
if missing:
|
|
if missing:
|
|
- print("Error: found undocumented settings:{0}{1}".format(
|
|
|
|
- sep, sep.join(sorted(missing))), file=sys.stderr)
|
|
|
|
|
|
+ print('Error: found undocumented settings:{0}{1}'.format(
|
|
|
|
+ sep, sep.join(sorted(missing))), file=stderr)
|
|
exit(1)
|
|
exit(1)
|
|
- print("OK: Configuration reference complete :-)")
|
|
|
|
|
|
+ print('OK: Configuration reference complete :-)')
|
|
exit(0)
|
|
exit(0)
|