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

Feature/pool #53

Merged
merged 17 commits into from
Aug 29, 2024
Merged

Feature/pool #53

merged 17 commits into from
Aug 29, 2024

Conversation

ajshedivy
Copy link
Collaborator

@ajshedivy ajshedivy commented Aug 28, 2024

Fixes #

Changes proposed in this pull request:

  • add async websocket logic
  • create new module pool for async support

Async usage:

import asyncio
from mapepire_python.pool.pool_job import PoolJob
from mapepire_python.types import DaemonServer

creds = DaemonServer(
    host=server,
    port=port,
    user=user,
    password=password,
    ignoreUnauthorized=True,
)

async def main():
    async with PoolJob(creds=creds) as job:
        query = job.query('select * from sample.employee')
        res = await query.run()
        assert res['success'] == True

if __name__ == '__main__':
    asyncio.run(main())
        

Pool usage

import asyncio
from mapepire_python.pool.pool_client import Pool, PoolOptions
from mapepire_python.types import DaemonServer

creds = DaemonServer(
    host=server,
    port=port,
    user=user,
    password=password,
    ignoreUnauthorized=True,
)


async def main():
    pool = Pool(
        options=PoolOptions(
            creds=creds,
            opts=None,
            max_size=5,
            starting_size=3
        )
    )
    await pool.init()
    
    job_names = []
    resultsA = await asyncio.gather(
        pool.execute('values (job_name)'),
        pool.execute('values (job_name)'),
        pool.execute('values (job_name)')
    )
    job_names = [res['data'][0]['00001'] for res in resultsA]

    assert len(job_names) == 3
    
    assert pool.get_active_job_count() == 3


if __name__ == '__main__':
    asyncio.run(main())

Before submitting

  • Change the base branch to dev if it is not already.
  • I've read and followed all steps in the Making a pull request
    section of the CONTRIBUTING docs.
  • I've updated or added any relevant docstrings following the syntax described in the
    Writing docstrings section of the CONTRIBUTING docs.
  • If this PR fixes a bug, I've added a test that will fail without my fix.
  • If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.

@worksofliam
Copy link

Looks like the tests are passing but it did log one huge warning:

Click me
(.venv) barry@Liams-MBP mapepire-python % pytest tests/                                 
/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
====================================================== test session starts ======================================================
platform darwin -- Python 3.12.4, pytest-8.3.2, pluggy-1.5.0
rootdir: /Users/barry/Repos/mapepire/mapepire-python/tests
configfile: pytest.ini
plugins: asyncio-0.24.0, env-1.1.3
asyncio: mode=Mode.STRICT, default_loop_scope=None
collected 59 items                                                                                                              

tests/async_pool_test.py .....................                                                                            [ 35%]
tests/cl_test.py ...                                                                                                      [ 40%]
tests/pooling_test.py ........                                                                                            [ 54%]
tests/query_manager_test.py .....                                                                                         [ 62%]
tests/simple_test.py ....                                                                                                 [ 69%]
tests/sql_test.py ..................                                                                                      [100%]

======================================================= warnings summary ========================================================
pooling_test.py::test_pool_with_no_space_but_ready_job_returns_ready_job
  /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x104468040>
  
  Traceback (most recent call last):
    File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/sslproto.py", line 88, in __init__
      def __init__(self, loop, ssl_protocol):
      
  RuntimeError: coroutine ignored GeneratorExit
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================== 59 passed, 1 warning in 66.52s (0:01:06) ============================================
Task was destroyed but it is pending!
task: <Task pending name='Task-225' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>
Task was destroyed but it is pending!
task: <Task pending name='Task-226' coro=<WebSocketCommonProtocol.keepalive_ping() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1244> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-227' coro=<WebSocketCommonProtocol.close_connection() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1289> wait_for=<Task pending name='Task-225' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>>
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x1042a8e10>
Traceback (most recent call last):
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1325, in close_connection
    await self.close_transport()
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1343, in close_transport
    if await self.wait_for_connection_lost():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1366, in wait_for_connection_lost
    async with asyncio_timeout(self.close_timeout):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/timeouts.py", line 145, in timeout
    loop = events.get_running_loop()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: no running event loop
Task was destroyed but it is pending!
task: <Task pending name='Task-228' coro=<PoolJob.message_handler() running at /Users/barry/Repos/mapepire/mapepire-python/mapepire_python/pool/pool_job.py:165> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-37' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>
Task was destroyed but it is pending!
task: <Task pending name='Task-38' coro=<WebSocketCommonProtocol.keepalive_ping() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1244> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-39' coro=<WebSocketCommonProtocol.close_connection() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1289> wait_for=<Task pending name='Task-37' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>>
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x103d42c20>
Traceback (most recent call last):
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1325, in close_connection
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1343, in close_transport
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1366, in wait_for_connection_lost
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/timeouts.py", line 145, in timeout
RuntimeError: no running event loop
Task was destroyed but it is pending!
task: <Task pending name='Task-40' coro=<PoolJob.message_handler() running at /Users/barry/Repos/mapepire/mapepire-python/mapepire_python/pool/pool_job.py:165> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-57' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>
Task was destroyed but it is pending!
task: <Task pending name='Task-58' coro=<WebSocketCommonProtocol.keepalive_ping() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1244> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-59' coro=<WebSocketCommonProtocol.close_connection() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1289> wait_for=<Task pending name='Task-57' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>>
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x103d60110>
Traceback (most recent call last):
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1325, in close_connection
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1343, in close_transport
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1366, in wait_for_connection_lost
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/timeouts.py", line 145, in timeout
RuntimeError: no running event loop
Task was destroyed but it is pending!
task: <Task pending name='Task-60' coro=<PoolJob.message_handler() running at /Users/barry/Repos/mapepire/mapepire-python/mapepire_python/pool/pool_job.py:165> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-72' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>
Task was destroyed but it is pending!
task: <Task pending name='Task-73' coro=<WebSocketCommonProtocol.keepalive_ping() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1244> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-74' coro=<WebSocketCommonProtocol.close_connection() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1289> wait_for=<Task pending name='Task-72' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>>
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x103d61be0>
Traceback (most recent call last):
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1325, in close_connection
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1343, in close_transport
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1366, in wait_for_connection_lost
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/timeouts.py", line 145, in timeout
RuntimeError: no running event loop
Task was destroyed but it is pending!
task: <Task pending name='Task-75' coro=<PoolJob.message_handler() running at /Users/barry/Repos/mapepire/mapepire-python/mapepire_python/pool/pool_job.py:165> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-82' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>
Task was destroyed but it is pending!
task: <Task pending name='Task-83' coro=<WebSocketCommonProtocol.keepalive_ping() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1244> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-84' coro=<WebSocketCommonProtocol.close_connection() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1289> wait_for=<Task pending name='Task-82' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-87' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>
Task was destroyed but it is pending!
task: <Task pending name='Task-88' coro=<WebSocketCommonProtocol.keepalive_ping() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1244> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-89' coro=<WebSocketCommonProtocol.close_connection() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1289> wait_for=<Task pending name='Task-87' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>>
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x103d63ed0>
Traceback (most recent call last):
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1325, in close_connection
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1343, in close_transport
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1366, in wait_for_connection_lost
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/timeouts.py", line 145, in timeout
RuntimeError: no running event loop
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x103d5c2b0>
Traceback (most recent call last):
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1325, in close_connection
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1343, in close_transport
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1366, in wait_for_connection_lost
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/timeouts.py", line 145, in timeout
RuntimeError: no running event loop
Task was destroyed but it is pending!
task: <Task pending name='Task-85' coro=<PoolJob.message_handler() running at /Users/barry/Repos/mapepire/mapepire-python/mapepire_python/pool/pool_job.py:165> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-90' coro=<PoolJob.message_handler() running at /Users/barry/Repos/mapepire/mapepire-python/mapepire_python/pool/pool_job.py:165> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-62' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>
Task was destroyed but it is pending!
task: <Task pending name='Task-63' coro=<WebSocketCommonProtocol.keepalive_ping() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1244> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-64' coro=<WebSocketCommonProtocol.close_connection() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1289> wait_for=<Task pending name='Task-62' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-92' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>
Task was destroyed but it is pending!
task: <Task pending name='Task-93' coro=<WebSocketCommonProtocol.keepalive_ping() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1244> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-94' coro=<WebSocketCommonProtocol.close_connection() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:1289> wait_for=<Task pending name='Task-92' coro=<WebSocketCommonProtocol.transfer_data() running at /Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py:955> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup(), _wait.<locals>._on_completion() at /opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py:534]>>
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x103d61a40>
Traceback (most recent call last):
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1325, in close_connection
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1343, in close_transport
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1366, in wait_for_connection_lost
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/timeouts.py", line 145, in timeout
RuntimeError: no running event loop
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x103d62c20>
Traceback (most recent call last):
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1325, in close_connection
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1343, in close_transport
  File "/Users/barry/Repos/mapepire/mapepire-python/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1366, in wait_for_connection_lost
  File "/opt/homebrew/Cellar/[email protected]/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/timeouts.py", line 145, in timeout
RuntimeError: no running event loop
Task was destroyed but it is pending!
task: <Task pending name='Task-65' coro=<PoolJob.message_handler() running at /Users/barry/Repos/mapepire/mapepire-python/mapepire_python/pool/pool_job.py:165> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-95' coro=<PoolJob.message_handler() running at /Users/barry/Repos/mapepire/mapepire-python/mapepire_python/pool/pool_job.py:165> wait_for=<Future pending cb=[Task.task_wakeup()]>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants