Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pool is closed issue during unit test #59

Open
zillionare opened this issue Jul 23, 2022 · 0 comments
Open

pool is closed issue during unit test #59

zillionare opened this issue Jul 23, 2022 · 0 comments
Assignees
Labels

Comments

@zillionare
Copy link
Owner

when performing unittest by tox, it complains:

tests/worker/test_jobs.py:23: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/root/miniconda3/envs/omega/lib/python3.8/site-packages/omicron/__init__.py:32: in init
    await tf.init()
/root/miniconda3/envs/omega/lib/python3.8/site-packages/omicron/models/timeframe.py:113: in init
    await cls._load_calendar()
/root/miniconda3/envs/omega/lib/python3.8/site-packages/omicron/models/timeframe.py:103: in _load_calendar
    result = await cache.security.lrange(key, 0, -1)
/root/miniconda3/envs/omega/lib/python3.8/site-packages/aioredis/pool.py:257: in _wait_execute
    conn = await self.acquire(command, args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ConnectionsPool [db:1, size:[1:10], free:0]>, command = b'LRANGE', args = ('calendar:1d', 0, -1)

    async def acquire(self, command=None, args=()):
        """Acquires a connection from free pool.
    
        Creates new connection if needed.
        """
        if self.closed:
>           raise PoolClosedError("Pool is closed")
E           aioredis.errors.PoolClosedError: Pool is closed

/root/miniconda3/envs/omega/lib/python3.8/site-packages/aioredis/pool.py:319: PoolClosedError

execute these ut case standalone contains no errors.

@zillionare zillionare self-assigned this Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant