taskiq-python / taskiq-redis

Broker and result backend for taskiq
MIT License
40 stars 18 forks source link

connection error when kiq new task from with in a sb task #70

Open keinagae opened 2 months ago

keinagae commented 2 months ago

here are stack traces

File "/lib/python3.11/site-packages/taskiq/receiver/receiver.py", line 271, in run_task
    returned = await target_future
               ^^^^^^^^^^^^^^^^^^^
  File "tasks.py", line 186, in start_new_user_data_sync
    await sync_data.kiq(**{
  File "/lib/python3.11/site-packages/taskiq/decor.py", line 99, in kiq
    return await self.kicker().kiq(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/taskiq/kicker.py", line 138, in kiq
    await self.broker.kick(self.broker.formatter.dumps(message))
  File "/lib/python3.11/site-packages/taskiq_redis/redis_broker.py", line 114, in kick
    await redis_conn.lpush(queue_name, message.message)
  File "/lib/python3.11/site-packages/sentry_sdk/integrations/redis/_async_common.py", line 93, in _sentry_execute_command
    value = await old_execute_command(self, name, *args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/redis/asyncio/client.py", line 607, in execute_command
    conn = self.connection or await pool.get_connection(command_name, **options)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/redis/asyncio/connection.py", line 1232, in get_connection
    await self.ensure_connection(connection)
  File "/lib/python3.11/site-packages/redis/asyncio/connection.py", line 1122, in ensure_connection
    if await connection.can_read_destructive():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/redis/asyncio/connection.py", line 504, in can_read_destructive
    return await self._parser.can_read_destructive()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/redis/_parsers/base.py", line 185, in can_read_destructive
    return await self._stream.read(1)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/asyncio/streams.py", line 689, in read
    await self._wait_for_data('read')
  File "/lib/python3.11/asyncio/streams.py", line 522, in _wait_for_data
    await self._waiter
asyncio.exceptions.CancelledError