Здравствуйте, я запускаю Django и Celery на aws SQS, но похоже, что AWS не получает сообщения. Но задачи выполняются:
Please specify a different user using the --uid option.
User information: uid=0 euid=0 gid=0 egid=0
uid=uid, euid=euid, gid=gid, egid=egid,
-------------- celery@ba117e7c453f v4.4.0 (cliffs)
--- ***** -----
-- ******* ---- Linux-4.9.125-linuxkit-x86_64-with 2020-02-26 20:21:14
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: config:0x7f10e26fada0
- ** ---------- .> transport: sqs://XXXXXXXXXXXXX:**@localhost//
- ** ---------- .> results: disabled://
- *** --- * --- .> concurrency: 2 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
. config.celery.debug_task
. project.orders.tasks.create_log_test
[2020-02-26 20:21:14,909: INFO/MainProcess] Connected to sqs://XXXXXXXXXXXX:**@localhost//
[2020-02-26 20:21:15,327: INFO/MainProcess] celery@ba117e7c453f ready.
[2020-02-26 20:21:32,895: INFO/MainProcess] Received task: project.orders.tasks.create_log_test[d4c20965-b1f2-47dd-b8a8-6f9cbe35be29]
[2020-02-26 20:21:53,648: INFO/ForkPoolWorker-2] Task project.orders.tasks.create_log_test[d4c20965-b1f2-47dd-b8a8-6f9cbe35be29] succeeded in 20.695041599974502s: None
[2020-02-26 20:22:39,801: INFO/MainProcess] Received task: project.orders.tasks.create_log_test[1d1b0892-078c-480c-ab7a-87662fd18ba3]
[2020-02-26 20:22:41,622: INFO/MainProcess] Received task: project.orders.tasks.create_log_test[6e755a91-b737-4e09-b910-03e84fd91c32]
[2020-02-26 20:22:43,237: INFO/MainProcess] Received task: project.orders.tasks.create_log_test[5fe1f145-a6d3-45d3-8ada-b1c636ee201c]
[2020-02-26 20:22:44,506: INFO/MainProcess] Received task: project.orders.tasks.create_log_test[84da9170-7861-488d-936f-5d3738e11af4]
[2020-02-26 20:22:47,056: INFO/MainProcess] Received task: project.orders.tasks.create_log_test[748dda1c-3b6d-40e6-b13b-637ea765dd72]
И на AWS консоли:
Это мои settings.py:
BROKER_URL = "sqs://{access_key}:{secret_key}@".format(
access_key=quote(AWS_ACCESS_KEY_ID, safe=""),
secret_key=quote(AWS_SECRET_ACCESS_KEY, safe=""),
)
BROKER_TRANSPORT_OPTIONS = {
"region": "eu-west-1",
"visibility_timeout": 60, # 1 minutes
"polling_interval": 5, # 5 seconds
"queue_name_prefix": "sqs-celery-example-",
}
# CELERY namespaced
CELERY_BROKER_URL = BROKER_URL
CELERY_BROKER_TRANSPORT_OPTIONS = BROKER_TRANSPORT_OPTIONS
CELERY_TASK_DEFAULT_QUEUE = "default"
Я что-то не так делаю?