소스 검색

Fixes stress test templates and adds SQS template

Ask Solem 11 년 전
부모
커밋
cdb745343c
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      funtests/stress/stress/templates.py

+ 9 - 1
funtests/stress/stress/templates.py

@@ -25,7 +25,7 @@ def use_template(app, template='default'):
     template = template.split(',')
 
     # mixin the rest of the templates when the config is needed
-    @app.on_after_configure.connect
+    @app.on_after_configure.connect(weak=False)
     def load_template(sender, source, **kwargs):
         mixin_templates(template[1:], source)
 
@@ -116,3 +116,11 @@ class events(default):
 @template()
 class execv(default):
     CELERYD_FORCE_EXECV = True
+
+
+@template()
+class sqs(default):
+    BROKER_URL='sqs://'
+    BROKER_TRANSPORT_OPTIONS = {
+        'region': os.environ.get('AWS_REGION', 'us-east-1'),
+    }