adds global sync configuration option

Setting the `sync` configuration option will force all async() calls to be run with `sync=True`. Useful for testing.
This commit is contained in:
Ilan
2015-08-13 18:02:38 +02:00
parent 3d12c1d36e
commit 6c37b09151
3 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ def async(func, *args, **kwargs):
task['save'] = save
# sign it
pack = signing.SignedPackage.dumps(task)
if sync:
if sync or Conf.SYNC:
return _sync(pack)
# push it
redis.rpush(list_key, pack)