芹菜工人不会从 SQS 开始



我正在使用sqs

运行
celery worker -A project.celery --loglevel=info

使用相同的SQS连接字符串信息,我可以连接到SQS队列,然后修改/写消息。但是芹菜工人不会开始。这给了我错误:

[2017-04-27 00:11:34,592: CRITICAL/MainProcess] Unrecoverable error: TypeError('invalid arguments to setopt',)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/celery/worker/worker.py", line 203, in start
    self.blueprint.start(self)
  File "/usr/local/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
    step.start(parent)
  File "/usr/local/lib/python2.7/site-packages/celery/bootsteps.py", line 370, in start
    return self.obj.start()
  File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 318, in start
    blueprint.start(self)
  File "/usr/local/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start
    step.start(parent)
  File "/usr/local/lib/python2.7/site-packages/celery/worker/consumer/consumer.py", line 594, in start
    c.loop(*c.loop_args())
  File "/usr/local/lib/python2.7/site-packages/celery/worker/loops.py", line 88, in asynloop
    next(loop)
  File "/usr/local/lib/python2.7/site-packages/kombu/async/hub.py", line 282, in create_loop
    item()
  File "/usr/local/lib/python2.7/site-packages/vine/promises.py", line 139, in __call__
    return self.throw()
  File "/usr/local/lib/python2.7/site-packages/vine/promises.py", line 136, in __call__
    retval = fun(*final_args, **final_kwargs)
  File "/usr/local/lib/python2.7/site-packages/kombu/transport/SQS.py", line 290, in _schedule_queue
    queue, callback=promise(self._loop1, (queue,)),
  File "/usr/local/lib/python2.7/site-packages/kombu/transport/SQS.py", line 306, in _get_bulk_async
    return self._get_async(queue, maxcount, callback=callback)
  File "/usr/local/lib/python2.7/site-packages/kombu/transport/SQS.py", line 316, in _get_async
    callback=transform(self._on_messages_ready, callback, q, queue),
  File "/usr/local/lib/python2.7/site-packages/kombu/transport/SQS.py", line 336, in _get_from_sqs
    callback=callback,
  File "/usr/local/lib/python2.7/site-packages/kombu/async/aws/sqs/connection.py", line 82, in receive_message
    queue.id, callback=callback,
  File "/usr/local/lib/python2.7/site-packages/kombu/async/aws/connection.py", line 239, in get_list
    self._on_list_ready, callback, parent or self, markers,
  File "/usr/local/lib/python2.7/site-packages/kombu/async/aws/connection.py", line 232, in make_request
    return self._mexe(request, callback=callback)
  File "/usr/local/lib/python2.7/site-packages/kombu/async/aws/connection.py", line 198, in _mexe
    conn.getresponse(callback=callback)
  File "/usr/local/lib/python2.7/site-packages/kombu/async/aws/connection.py", line 129, in getresponse
    return self.http_client.add_request(request)
  File "/usr/local/lib/python2.7/site-packages/kombu/async/http/curl.py", line 74, in add_request
    self._process_queue()
  File "/usr/local/lib/python2.7/site-packages/kombu/async/http/curl.py", line 152, in _process_queue
    self._setup_request(curl, request, buf, headers)
  File "/usr/local/lib/python2.7/site-packages/kombu/async/http/curl.py", line 186, in _setup_request
    setopt(_pycurl.URL, bytes_to_str(request.url))
TypeError: invalid arguments to setopt

有人可以帮我找出config/start错误可能是什么?

好的,所以我最终使用了类似于另一个答案的URL更改。从:

中嘲笑经纪人URL
"sqs://id:key@"

to

"sqs://id:key@:80"

可以运行服务,但不允许我连接到SQS

我实际上最终做的是放弃SQS,并在Redis上使用Elasticache运行所有内容。这很容易

相关内容

  • 没有找到相关文章