1. Dave Evans
  2. celery-pylons

Commits

Dave Evans  committed 1e9d356 Draft

Handle settings values that are dictionaries.
Particularly useful for BROKER_TRANSPORT_OPTIONS

  • Participants
  • Parent commits c40a87b
  • Branches default

Comments (0)

Files changed (2)

File celerypylons/loader.py

View file
  • Ignore whitespace
         #cast to bool
         if value.lower() in ['true', 'false']:
             return value.lower() == 'true'
+
+        #cast to dict
+        if isinstance(value, basestring):
+            import json
+            try:
+                return json.loads(value) 
+            except Exception, e:
+                pass
+
         return value
 
 class PylonsLoader(BaseLoader):

File setup.py

View file
  • Ignore whitespace
     use_setuptools()
     from setuptools import setup, find_packages, Command
 
-version = '2.0.1'
+version = '2.0.2'
 
 setup(name='celery-pylons',
       version=version,