Files
Imago/admin_test_errors.log
T
bruno 2f2a5e9b4a
CI / Lint & Format (push) Failing after 28s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 8s
CI / Docker Build (push) Has been skipped
Add admin panel, WebSocket support, and API versioning
Introduce an admin portal (React + Nginx), WebSocket routing, and
API versioning middleware with `/api/v1/` prefix deprecation.
Add master API key authentication, new Prometheus metrics for AI
token consumption and active WebSockets, and extend S3 config
with a public endpoint URL. Update test paths and fixtures to
align with the new routing structure.
2026-06-22 11:25:22 -04:00

1126 lines
166 KiB
Plaintext

c:\Users\bruno\scoop\apps\python\3.14.3\Lib\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 win32 -- Python 3.14.3, pytest-8.3.3, pluggy-1.6.0 -- C:\Users\bruno\scoop\apps\python\current\python.exe
cachedir: .pytest_cache
rootdir: C:\dev\git\python\imago
configfile: pytest.ini
plugins: anyio-4.12.0, asyncio-0.24.0, cov-5.0.0, mock-3.15.1, respx-0.22.0
asyncio: mode=Mode.AUTO, default_loop_scope=None
collecting ... collected 4 items
tests/test_admin.py::test_admin_stats PASSED [ 25%]
tests/test_admin.py::test_admin_clients PASSED [ 50%]
tests/test_admin.py::test_admin_queue_status FAILED [ 75%]
tests/test_admin.py::test_admin_toggle_and_reset FAILED [100%]
================================== FAILURES ===================================
___________________________ test_admin_queue_status ___________________________
+ Exception Group Traceback (most recent call last):
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_utils.py", line 77, in collapse_excgroups
| yield
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py", line 186, in __call__
| async with anyio.create_task_group() as task_group:
| ~~~~~~~~~~~~~~~~~~~~~~~^^
| File "c:\Users\bruno\scoop\apps\python\3.14.3\Lib\site-packages\anyio\_backends\_asyncio.py", line 783, in __aexit__
| raise BaseExceptionGroup(
| "unhandled errors in a TaskGroup", self._exceptions
| ) from None
| ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\runner.py", line 341, in from_call
| result: TResult | None = func()
| ~~~~^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\runner.py", line 242, in <lambda>
| lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
| ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_hooks.py", line 512, in __call__
| return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
| ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_manager.py", line 120, in _hookexec
| return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
| ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 167, in _multicall
| raise exception
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 139, in _multicall
| teardown.throw(exception)
| ~~~~~~~~~~~~~~^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\threadexception.py", line 92, in pytest_runtest_call
| yield from thread_exception_runtest_hook()
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\threadexception.py", line 68, in thread_exception_runtest_hook
| yield
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 139, in _multicall
| teardown.throw(exception)
| ~~~~~~~~~~~~~~^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\unraisableexception.py", line 95, in pytest_runtest_call
| yield from unraisable_exception_runtest_hook()
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\unraisableexception.py", line 70, in unraisable_exception_runtest_hook
| yield
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 139, in _multicall
| teardown.throw(exception)
| ~~~~~~~~~~~~~~^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\logging.py", line 846, in pytest_runtest_call
| yield from self._runtest_for(item, "call")
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\logging.py", line 829, in _runtest_for
| yield
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 139, in _multicall
| teardown.throw(exception)
| ~~~~~~~~~~~~~~^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\capture.py", line 880, in pytest_runtest_call
| return (yield)
| ^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 139, in _multicall
| teardown.throw(exception)
| ~~~~~~~~~~~~~~^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\skipping.py", line 257, in pytest_runtest_call
| return (yield)
| ^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 121, in _multicall
| res = hook_impl.function(*args)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\runner.py", line 174, in pytest_runtest_call
| item.runtest()
| ~~~~~~~~~~~~^^
| File "c:\Users\bruno\scoop\apps\python\3.14.3\Lib\site-packages\pytest_asyncio\plugin.py", line 457, in runtest
| super().runtest()
| ~~~~~~~~~~~~~~~^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\python.py", line 1627, in runtest
| self.ihook.pytest_pyfunc_call(pyfuncitem=self)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_hooks.py", line 512, in __call__
| return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
| ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_manager.py", line 120, in _hookexec
| return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
| ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 167, in _multicall
| raise exception
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 139, in _multicall
| teardown.throw(exception)
| ~~~~~~~~~~~~~~^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 53, in run_old_style_hookwrapper
| return result.get_result()
| ~~~~~~~~~~~~~~~~~^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_result.py", line 103, in get_result
| raise exc.with_traceback(tb)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 38, in run_old_style_hookwrapper
| res = yield
| ^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\pluggy\_callers.py", line 121, in _multicall
| res = hook_impl.function(*args)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\python.py", line 159, in pytest_pyfunc_call
| result = testfunction(**testargs)
| File "c:\Users\bruno\scoop\apps\python\3.14.3\Lib\site-packages\pytest_asyncio\plugin.py", line 929, in inner
| _loop.run_until_complete(task)
| ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\asyncio\base_events.py", line 719, in run_until_complete
| return future.result()
| ~~~~~~~~~~~~~^^
| File "C:\dev\git\python\imago\tests\test_admin.py", line 27, in test_admin_queue_status
| response = await async_client.get("/admin/api/queue/status", headers=admin_headers)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py", line 1814, in get
| return await self.request(
| ^^^^^^^^^^^^^^^^^^^
| ...<9 lines>...
| )
| ^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py", line 1585, in request
| return await self.send(request, auth=auth, follow_redirects=follow_redirects)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py", line 1674, in send
| response = await self._send_handling_auth(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ...<4 lines>...
| )
| ^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py", line 1702, in _send_handling_auth
| response = await self._send_handling_redirects(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ...<3 lines>...
| )
| ^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py", line 1739, in _send_handling_redirects
| response = await self._send_single_request(request)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py", line 1776, in _send_single_request
| response = await transport.handle_async_request(request)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_transports\asgi.py", line 157, in handle_async_request
| await self.app(scope, receive, send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
| await super().__call__(scope, receive, send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\applications.py", line 113, in __call__
| await self.middleware_stack(scope, receive, send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\errors.py", line 187, in __call__
| raise exc
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\errors.py", line 165, in __call__
| await self.app(scope, receive, _send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\prometheus_fastapi_instrumentator\middleware.py", line 174, in __call__
| raise exc
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\prometheus_fastapi_instrumentator\middleware.py", line 172, in __call__
| await self.app(scope, receive, send_wrapper)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py", line 185, in __call__
| with collapse_excgroups():
| ~~~~~~~~~~~~~~~~~~^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\contextlib.py", line 162, in __exit__
| self.gen.throw(value)
| ~~~~~~~~~~~~~~^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_utils.py", line 83, in collapse_excgroups
| raise exc
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py", line 187, in __call__
| response = await self.dispatch_func(request, call_next)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\dev\git\python\imago\app\middleware\logging_middleware.py", line 26, in dispatch
| response = await call_next(request)
| ^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py", line 163, in call_next
| raise app_exc
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py", line 149, in coro
| await self.app(scope, receive_or_disconnect, send_no_error)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py", line 185, in __call__
| with collapse_excgroups():
| ~~~~~~~~~~~~~~~~~~^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\contextlib.py", line 162, in __exit__
| self.gen.throw(value)
| ~~~~~~~~~~~~~~^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_utils.py", line 83, in collapse_excgroups
| raise exc
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py", line 187, in __call__
| response = await self.dispatch_func(request, call_next)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\dev\git\python\imago\app\middleware\versioning.py", line 22, in dispatch
| response = await call_next(request)
| ^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py", line 163, in call_next
| raise app_exc
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py", line 149, in coro
| await self.app(scope, receive_or_disconnect, send_no_error)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\cors.py", line 85, in __call__
| await self.app(scope, receive, send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
| await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
| raise exc
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
| await app(scope, receive, sender)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py", line 715, in __call__
| await self.middleware_stack(scope, receive, send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py", line 735, in app
| await route.handle(scope, receive, send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py", line 288, in handle
| await self.app(scope, receive, send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py", line 76, in app
| await wrap_app_handling_exceptions(app, request)(scope, receive, send)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
| raise exc
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
| await app(scope, receive, sender)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py", line 73, in app
| response = await f(request)
| ^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\fastapi\routing.py", line 301, in app
| raw_response = await run_endpoint_function(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ...<3 lines>...
| )
| ^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\fastapi\routing.py", line 212, in run_endpoint_function
| return await dependant.call(**values)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\dev\git\python\imago\app\routers\admin.py", line 79, in get_queue_status
| pending_count = await redis.llen("arq:queue")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\redis\asyncio\client.py", line 610, in execute_command
| conn = self.connection or await pool.get_connection(command_name, **options)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\redis\asyncio\connection.py", line 1049, in get_connection
| await self.ensure_connection(connection)
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\redis\asyncio\connection.py", line 1082, in ensure_connection
| await connection.connect()
| File "C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\redis\asyncio\connection.py", line 284, in connect
| raise ConnectionError(self._error_message(e))
| redis.exceptions.ConnectionError: Error 11001 connecting to redis:6379. getaddrinfo failed.
+------------------------------------
During handling of the above exception, another exception occurred:
async_client = <httpx.AsyncClient object at 0x000001AA95E8E5D0>
admin_headers = {'Authorization': 'Bearer test-key-admin-secret-000000'}
admin_client = <APIClient id=7d6dd0df-39da-4ab0-afd5-6d1a3b00cf5d name=Admin Client plan=ClientPlan.PREMIUM>
@pytest.mark.asyncio
async def test_admin_queue_status(async_client: AsyncClient, admin_headers: dict, admin_client):
> response = await async_client.get("/admin/api/queue/status", headers=admin_headers)
tests\test_admin.py:27:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py:1814: in get
return await self.request(
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py:1585: in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py:1674: in send
response = await self._send_handling_auth(
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py:1702: in _send_handling_auth
response = await self._send_handling_redirects(
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py:1739: in _send_handling_redirects
response = await self._send_single_request(request)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_client.py:1776: in _send_single_request
response = await transport.handle_async_request(request)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\httpx\_transports\asgi.py:157: in handle_async_request
await self.app(scope, receive, send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\fastapi\applications.py:1054: in __call__
await super().__call__(scope, receive, send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\applications.py:113: in __call__
await self.middleware_stack(scope, receive, send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\errors.py:187: in __call__
raise exc
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\errors.py:165: in __call__
await self.app(scope, receive, _send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\prometheus_fastapi_instrumentator\middleware.py:174: in __call__
raise exc
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\prometheus_fastapi_instrumentator\middleware.py:172: in __call__
await self.app(scope, receive, send_wrapper)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py:185: in __call__
with collapse_excgroups():
C:\Users\bruno\scoop\apps\python\current\Lib\contextlib.py:162: in __exit__
self.gen.throw(value)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_utils.py:83: in collapse_excgroups
raise exc
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py:187: in __call__
response = await self.dispatch_func(request, call_next)
app\middleware\logging_middleware.py:26: in dispatch
response = await call_next(request)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py:163: in call_next
raise app_exc
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py:149: in coro
await self.app(scope, receive_or_disconnect, send_no_error)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py:185: in __call__
with collapse_excgroups():
C:\Users\bruno\scoop\apps\python\current\Lib\contextlib.py:162: in __exit__
self.gen.throw(value)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_utils.py:83: in collapse_excgroups
raise exc
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py:187: in __call__
response = await self.dispatch_func(request, call_next)
app\middleware\versioning.py:22: in dispatch
response = await call_next(request)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py:163: in call_next
raise app_exc
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\base.py:149: in coro
await self.app(scope, receive_or_disconnect, send_no_error)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\cors.py:85: in __call__
await self.app(scope, receive, send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\middleware\exceptions.py:62: in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_exception_handler.py:62: in wrapped_app
raise exc
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_exception_handler.py:51: in wrapped_app
await app(scope, receive, sender)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py:715: in __call__
await self.middleware_stack(scope, receive, send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py:735: in app
await route.handle(scope, receive, send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py:288: in handle
await self.app(scope, receive, send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py:76: in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_exception_handler.py:62: in wrapped_app
raise exc
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\_exception_handler.py:51: in wrapped_app
await app(scope, receive, sender)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\starlette\routing.py:73: in app
response = await f(request)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\fastapi\routing.py:301: in app
raw_response = await run_endpoint_function(
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\fastapi\routing.py:212: in run_endpoint_function
return await dependant.call(**values)
app\routers\admin.py:79: in get_queue_status
pending_count = await redis.llen("arq:queue")
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\redis\asyncio\client.py:610: in execute_command
conn = self.connection or await pool.get_connection(command_name, **options)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\redis\asyncio\connection.py:1049: in get_connection
await self.ensure_connection(connection)
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\redis\asyncio\connection.py:1082: in ensure_connection
await connection.connect()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <redis.asyncio.connection.Connection(host=redis,port=6379,db=0)>
async def connect(self):
"""Connects to the Redis server if not already connected"""
if self.is_connected:
return
try:
await self.retry.call_with_retry(
lambda: self._connect(), lambda error: self.disconnect()
)
except asyncio.CancelledError:
raise # in 3.7 and earlier, this is an Exception, not BaseException
except (socket.timeout, asyncio.TimeoutError):
raise TimeoutError("Timeout connecting to server")
except OSError as e:
> raise ConnectionError(self._error_message(e))
E redis.exceptions.ConnectionError: Error 11001 connecting to redis:6379. getaddrinfo failed.
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\redis\asyncio\connection.py:284: ConnectionError
---------------------------- Captured stdout setup ----------------------------
2026-02-25T16:33:10.625293Z [debug ] Using proactor: IocpProactor [asyncio]
2026-02-25T16:33:10.626673Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.626901Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.627210Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E2F640>, 'PRAGMA main.table_info("images")', ()) [aiosqlite]
2026-02-25T16:33:10.627520Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E2F640>, 'PRAGMA main.table_info("images")', ()) completed [aiosqlite]
2026-02-25T16:33:10.627898Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95E2F640>) [aiosqlite]
2026-02-25T16:33:10.628054Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95E2F640>) completed [aiosqlite]
2026-02-25T16:33:10.628310Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E2F640>) [aiosqlite]
2026-02-25T16:33:10.628466Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E2F640>) completed [aiosqlite]
2026-02-25T16:33:10.628787Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.628930Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.629163Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95EF3E40>, 'PRAGMA temp.table_info("images")', ()) [aiosqlite]
2026-02-25T16:33:10.629345Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95EF3E40>, 'PRAGMA temp.table_info("images")', ()) completed [aiosqlite]
2026-02-25T16:33:10.629580Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95EF3E40>) [aiosqlite]
2026-02-25T16:33:10.629715Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95EF3E40>) completed [aiosqlite]
2026-02-25T16:33:10.629959Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95EF3E40>) [aiosqlite]
2026-02-25T16:33:10.630086Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95EF3E40>) completed [aiosqlite]
2026-02-25T16:33:10.630482Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.630650Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.630877Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AAF10038C0>, 'PRAGMA main.table_info("api_clients")', ()) [aiosqlite]
2026-02-25T16:33:10.631051Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AAF10038C0>, 'PRAGMA main.table_info("api_clients")', ()) completed [aiosqlite]
2026-02-25T16:33:10.631270Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AAF10038C0>) [aiosqlite]
2026-02-25T16:33:10.631406Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AAF10038C0>) completed [aiosqlite]
2026-02-25T16:33:10.631652Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AAF10038C0>) [aiosqlite]
2026-02-25T16:33:10.631922Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AAF10038C0>) completed [aiosqlite]
2026-02-25T16:33:10.632348Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.632489Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.632775Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E49240>, 'PRAGMA temp.table_info("api_clients")', ()) [aiosqlite]
2026-02-25T16:33:10.633050Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E49240>, 'PRAGMA temp.table_info("api_clients")', ()) completed [aiosqlite]
2026-02-25T16:33:10.633381Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95E49240>) [aiosqlite]
2026-02-25T16:33:10.633530Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95E49240>) completed [aiosqlite]
2026-02-25T16:33:10.633804Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E49240>) [aiosqlite]
2026-02-25T16:33:10.634047Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E49240>) completed [aiosqlite]
2026-02-25T16:33:10.634845Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.635045Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.635341Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E48D40>, '\nCREATE TABLE api_clients (\n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(256) NOT NULL, \n\tapi_key_hash VARCHAR(64) NOT NULL, \n\tscopes JSON NOT NULL, \n\t"plan" VARCHAR(8) NOT NULL, \n\tis_active BOOLEAN NOT NULL, \n\tstorage_used_bytes BIGINT NOT NULL, \n\tquota_storage_mb INTEGER NOT NULL, \n\tquota_images INTEGER NOT NULL, \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id)\n)\n\n', ()) [aiosqlite]
2026-02-25T16:33:10.635691Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E48D40>, '\nCREATE TABLE api_clients (\n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(256) NOT NULL, \n\tapi_key_hash VARCHAR(64) NOT NULL, \n\tscopes JSON NOT NULL, \n\t"plan" VARCHAR(8) NOT NULL, \n\tis_active BOOLEAN NOT NULL, \n\tstorage_used_bytes BIGINT NOT NULL, \n\tquota_storage_mb INTEGER NOT NULL, \n\tquota_images INTEGER NOT NULL, \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id)\n)\n\n', ()) completed [aiosqlite]
2026-02-25T16:33:10.635962Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E48D40>) [aiosqlite]
2026-02-25T16:33:10.636101Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E48D40>) completed [aiosqlite]
2026-02-25T16:33:10.636470Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.636622Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.636899Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7EFC0>, 'CREATE UNIQUE INDEX ix_api_clients_api_key_hash ON api_clients (api_key_hash)', ()) [aiosqlite]
2026-02-25T16:33:10.637306Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7EFC0>, 'CREATE UNIQUE INDEX ix_api_clients_api_key_hash ON api_clients (api_key_hash)', ()) completed [aiosqlite]
2026-02-25T16:33:10.637705Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7EFC0>) [aiosqlite]
2026-02-25T16:33:10.637950Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7EFC0>) completed [aiosqlite]
2026-02-25T16:33:10.638457Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.638657Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.638919Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7F0C0>, 'CREATE INDEX ix_api_clients_id ON api_clients (id)', ()) [aiosqlite]
2026-02-25T16:33:10.639151Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7F0C0>, 'CREATE INDEX ix_api_clients_id ON api_clients (id)', ()) completed [aiosqlite]
2026-02-25T16:33:10.639395Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7F0C0>) [aiosqlite]
2026-02-25T16:33:10.639531Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7F0C0>) completed [aiosqlite]
2026-02-25T16:33:10.640363Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.640616Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.641056Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E48E40>, '\nCREATE TABLE images (\n\tid INTEGER NOT NULL, \n\tuuid VARCHAR(36) NOT NULL, \n\tclient_id VARCHAR(36) NOT NULL, \n\toriginal_name VARCHAR(512) NOT NULL, \n\tfilename VARCHAR(512) NOT NULL, \n\tfile_path VARCHAR(1024) NOT NULL, \n\tthumbnail_path VARCHAR(1024), \n\tmime_type VARCHAR(128), \n\tfile_size BIGINT, \n\twidth INTEGER, \n\theight INTEGER, \n\tuploaded_at DATETIME, \n\tprocessing_status VARCHAR(10) NOT NULL, \n\tprocessing_error TEXT, \n\tprocessing_started_at DATETIME, \n\tprocessing_done_at DATETIME, \n\texif_raw JSON, \n\texif_make VARCHAR(256), \n\texif_model VARCHAR(256), \n\texif_lens VARCHAR(256), \n\texif_taken_at DATETIME, \n\texif_gps_lat FLOAT, \n\texif_gps_lon FLOAT, \n\texif_altitude FLOAT, \n\texif_iso INTEGER, \n\texif_aperture VARCHAR(32), \n\texif_shutter VARCHAR(32), \n\texif_focal VARCHAR(32), \n\texif_flash BOOLEAN, \n\texif_orientation INTEGER, \n\texif_software VARCHAR(256), \n\tocr_text TEXT, \n\tocr_language VARCHAR(64), \n\tocr_confidence FLOAT, \n\tocr_has_text BOOLEAN, \n\tai_description TEXT, \n\tai_tags JSON, \n\tai_confidence FLOAT, \n\tai_model_used VARCHAR(128), \n\tai_processed_at DATETIME, \n\tai_prompt_tokens INTEGER, \n\tai_output_tokens INTEGER, \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(client_id) REFERENCES api_clients (id)\n)\n\n', ()) [aiosqlite]
2026-02-25T16:33:10.641504Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E48E40>, '\nCREATE TABLE images (\n\tid INTEGER NOT NULL, \n\tuuid VARCHAR(36) NOT NULL, \n\tclient_id VARCHAR(36) NOT NULL, \n\toriginal_name VARCHAR(512) NOT NULL, \n\tfilename VARCHAR(512) NOT NULL, \n\tfile_path VARCHAR(1024) NOT NULL, \n\tthumbnail_path VARCHAR(1024), \n\tmime_type VARCHAR(128), \n\tfile_size BIGINT, \n\twidth INTEGER, \n\theight INTEGER, \n\tuploaded_at DATETIME, \n\tprocessing_status VARCHAR(10) NOT NULL, \n\tprocessing_error TEXT, \n\tprocessing_started_at DATETIME, \n\tprocessing_done_at DATETIME, \n\texif_raw JSON, \n\texif_make VARCHAR(256), \n\texif_model VARCHAR(256), \n\texif_lens VARCHAR(256), \n\texif_taken_at DATETIME, \n\texif_gps_lat FLOAT, \n\texif_gps_lon FLOAT, \n\texif_altitude FLOAT, \n\texif_iso INTEGER, \n\texif_aperture VARCHAR(32), \n\texif_shutter VARCHAR(32), \n\texif_focal VARCHAR(32), \n\texif_flash BOOLEAN, \n\texif_orientation INTEGER, \n\texif_software VARCHAR(256), \n\tocr_text TEXT, \n\tocr_language VARCHAR(64), \n\tocr_confidence FLOAT, \n\tocr_has_text BOOLEAN, \n\tai_description TEXT, \n\tai_tags JSON, \n\tai_confidence FLOAT, \n\tai_model_used VARCHAR(128), \n\tai_processed_at DATETIME, \n\tai_prompt_tokens INTEGER, \n\tai_output_tokens INTEGER, \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(client_id) REFERENCES api_clients (id)\n)\n\n', ()) completed [aiosqlite]
2026-02-25T16:33:10.641834Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E48E40>) [aiosqlite]
2026-02-25T16:33:10.641974Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E48E40>) completed [aiosqlite]
2026-02-25T16:33:10.642343Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.642479Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.642707Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7FDC0>, 'CREATE UNIQUE INDEX ix_images_uuid ON images (uuid)', ()) [aiosqlite]
2026-02-25T16:33:10.642916Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7FDC0>, 'CREATE UNIQUE INDEX ix_images_uuid ON images (uuid)', ()) completed [aiosqlite]
2026-02-25T16:33:10.643156Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7FDC0>) [aiosqlite]
2026-02-25T16:33:10.643290Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7FDC0>) completed [aiosqlite]
2026-02-25T16:33:10.643594Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.643724Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.643980Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7FC40>, 'CREATE INDEX ix_images_id ON images (id)', ()) [aiosqlite]
2026-02-25T16:33:10.644203Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7FC40>, 'CREATE INDEX ix_images_id ON images (id)', ()) completed [aiosqlite]
2026-02-25T16:33:10.644437Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7FC40>) [aiosqlite]
2026-02-25T16:33:10.644618Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7FC40>) completed [aiosqlite]
2026-02-25T16:33:10.644968Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.645108Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.645370Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7F4C0>, 'CREATE INDEX ix_images_client_id ON images (client_id)', ()) [aiosqlite]
2026-02-25T16:33:10.645597Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7F4C0>, 'CREATE INDEX ix_images_client_id ON images (client_id)', ()) completed [aiosqlite]
2026-02-25T16:33:10.645874Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7F4C0>) [aiosqlite]
2026-02-25T16:33:10.646028Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7F4C0>) completed [aiosqlite]
2026-02-25T16:33:10.646365Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.646521Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.646742Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7E7C0>, 'CREATE INDEX ix_images_processing_status ON images (processing_status)', ()) [aiosqlite]
2026-02-25T16:33:10.646969Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7E7C0>, 'CREATE INDEX ix_images_processing_status ON images (processing_status)', ()) completed [aiosqlite]
2026-02-25T16:33:10.647266Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7E7C0>) [aiosqlite]
2026-02-25T16:33:10.647422Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7E7C0>) completed [aiosqlite]
2026-02-25T16:33:10.647795Z [debug ] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.647935Z [debug ] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.648243Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.648376Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.650400Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.650641Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.650959Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F12B40>, 'INSERT INTO api_clients (id, name, api_key_hash, scopes, "plan", is_active, storage_used_bytes, quota_storage_mb, quota_images, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ('7d6dd0df-39da-4ab0-afd5-6d1a3b00cf5d', 'Admin Client', 'c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3', '["images:read", "images:write", "images:delete", "ai:use", "admin"]', 'PREMIUM', 1, 0, 500, 1000, '2026-02-25 16:33:10.650223', '2026-02-25 16:33:10.650226')) [aiosqlite]
2026-02-25T16:33:10.651207Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F12B40>, 'INSERT INTO api_clients (id, name, api_key_hash, scopes, "plan", is_active, storage_used_bytes, quota_storage_mb, quota_images, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ('7d6dd0df-39da-4ab0-afd5-6d1a3b00cf5d', 'Admin Client', 'c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3', '["images:read", "images:write", "images:delete", "ai:use", "admin"]', 'PREMIUM', 1, 0, 500, 1000, '2026-02-25 16:33:10.650223', '2026-02-25 16:33:10.650226')) completed [aiosqlite]
2026-02-25T16:33:10.651481Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F12B40>) [aiosqlite]
2026-02-25T16:33:10.651623Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F12B40>) completed [aiosqlite]
2026-02-25T16:33:10.652125Z [debug ] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.652285Z [debug ] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.652610Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.652868Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.653665Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.653928Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.654286Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F50540>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('7d6dd0df-39da-4ab0-afd5-6d1a3b00cf5d',)) [aiosqlite]
2026-02-25T16:33:10.654636Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F50540>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('7d6dd0df-39da-4ab0-afd5-6d1a3b00cf5d',)) completed [aiosqlite]
2026-02-25T16:33:10.655009Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95F50540>) [aiosqlite]
2026-02-25T16:33:10.655269Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95F50540>) completed [aiosqlite]
2026-02-25T16:33:10.655701Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F50540>) [aiosqlite]
2026-02-25T16:33:10.655968Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F50540>) completed [aiosqlite]
----------------------------- Captured log setup ------------------------------
DEBUG asyncio:proactor_events.py:633 Using proactor: IocpProactor
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E2F640>, 'PRAGMA main.table_info("images")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E2F640>, 'PRAGMA main.table_info("images")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95E2F640>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95E2F640>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E2F640>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E2F640>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95EF3E40>, 'PRAGMA temp.table_info("images")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95EF3E40>, 'PRAGMA temp.table_info("images")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95EF3E40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95EF3E40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95EF3E40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95EF3E40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AAF10038C0>, 'PRAGMA main.table_info("api_clients")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AAF10038C0>, 'PRAGMA main.table_info("api_clients")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AAF10038C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AAF10038C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AAF10038C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AAF10038C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E49240>, 'PRAGMA temp.table_info("api_clients")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E49240>, 'PRAGMA temp.table_info("api_clients")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95E49240>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95E49240>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E49240>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E49240>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E48D40>, '\nCREATE TABLE api_clients (\n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(256) NOT NULL, \n\tapi_key_hash VARCHAR(64) NOT NULL, \n\tscopes JSON NOT NULL, \n\t"plan" VARCHAR(8) NOT NULL, \n\tis_active BOOLEAN NOT NULL, \n\tstorage_used_bytes BIGINT NOT NULL, \n\tquota_storage_mb INTEGER NOT NULL, \n\tquota_images INTEGER NOT NULL, \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id)\n)\n\n', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E48D40>, '\nCREATE TABLE api_clients (\n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(256) NOT NULL, \n\tapi_key_hash VARCHAR(64) NOT NULL, \n\tscopes JSON NOT NULL, \n\t"plan" VARCHAR(8) NOT NULL, \n\tis_active BOOLEAN NOT NULL, \n\tstorage_used_bytes BIGINT NOT NULL, \n\tquota_storage_mb INTEGER NOT NULL, \n\tquota_images INTEGER NOT NULL, \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id)\n)\n\n', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E48D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E48D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7EFC0>, 'CREATE UNIQUE INDEX ix_api_clients_api_key_hash ON api_clients (api_key_hash)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7EFC0>, 'CREATE UNIQUE INDEX ix_api_clients_api_key_hash ON api_clients (api_key_hash)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7EFC0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7EFC0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7F0C0>, 'CREATE INDEX ix_api_clients_id ON api_clients (id)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7F0C0>, 'CREATE INDEX ix_api_clients_id ON api_clients (id)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7F0C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7F0C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E48E40>, '\nCREATE TABLE images (\n\tid INTEGER NOT NULL, \n\tuuid VARCHAR(36) NOT NULL, \n\tclient_id VARCHAR(36) NOT NULL, \n\toriginal_name VARCHAR(512) NOT NULL, \n\tfilename VARCHAR(512) NOT NULL, \n\tfile_path VARCHAR(1024) NOT NULL, \n\tthumbnail_path VARCHAR(1024), \n\tmime_type VARCHAR(128), \n\tfile_size BIGINT, \n\twidth INTEGER, \n\theight INTEGER, \n\tuploaded_at DATETIME, \n\tprocessing_status VARCHAR(10) NOT NULL, \n\tprocessing_error TEXT, \n\tprocessing_started_at DATETIME, \n\tprocessing_done_at DATETIME, \n\texif_raw JSON, \n\texif_make VARCHAR(256), \n\texif_model VARCHAR(256), \n\texif_lens VARCHAR(256), \n\texif_taken_at DATETIME, \n\texif_gps_lat FLOAT, \n\texif_gps_lon FLOAT, \n\texif_altitude FLOAT, \n\texif_iso INTEGER, \n\texif_aperture VARCHAR(32), \n\texif_shutter VARCHAR(32), \n\texif_focal VARCHAR(32), \n\texif_flash BOOLEAN, \n\texif_orientation INTEGER, \n\texif_software VARCHAR(256), \n\tocr_text TEXT, \n\tocr_language VARCHAR(64), \n\tocr_confidence FLOAT, \n\tocr_has_text BOOLEAN, \n\tai_description TEXT, \n\tai_tags JSON, \n\tai_confidence FLOAT, \n\tai_model_used VARCHAR(128), \n\tai_processed_at DATETIME, \n\tai_prompt_tokens INTEGER, \n\tai_output_tokens INTEGER, \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(client_id) REFERENCES api_clients (id)\n)\n\n', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E48E40>, '\nCREATE TABLE images (\n\tid INTEGER NOT NULL, \n\tuuid VARCHAR(36) NOT NULL, \n\tclient_id VARCHAR(36) NOT NULL, \n\toriginal_name VARCHAR(512) NOT NULL, \n\tfilename VARCHAR(512) NOT NULL, \n\tfile_path VARCHAR(1024) NOT NULL, \n\tthumbnail_path VARCHAR(1024), \n\tmime_type VARCHAR(128), \n\tfile_size BIGINT, \n\twidth INTEGER, \n\theight INTEGER, \n\tuploaded_at DATETIME, \n\tprocessing_status VARCHAR(10) NOT NULL, \n\tprocessing_error TEXT, \n\tprocessing_started_at DATETIME, \n\tprocessing_done_at DATETIME, \n\texif_raw JSON, \n\texif_make VARCHAR(256), \n\texif_model VARCHAR(256), \n\texif_lens VARCHAR(256), \n\texif_taken_at DATETIME, \n\texif_gps_lat FLOAT, \n\texif_gps_lon FLOAT, \n\texif_altitude FLOAT, \n\texif_iso INTEGER, \n\texif_aperture VARCHAR(32), \n\texif_shutter VARCHAR(32), \n\texif_focal VARCHAR(32), \n\texif_flash BOOLEAN, \n\texif_orientation INTEGER, \n\texif_software VARCHAR(256), \n\tocr_text TEXT, \n\tocr_language VARCHAR(64), \n\tocr_confidence FLOAT, \n\tocr_has_text BOOLEAN, \n\tai_description TEXT, \n\tai_tags JSON, \n\tai_confidence FLOAT, \n\tai_model_used VARCHAR(128), \n\tai_processed_at DATETIME, \n\tai_prompt_tokens INTEGER, \n\tai_output_tokens INTEGER, \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(client_id) REFERENCES api_clients (id)\n)\n\n', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E48E40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E48E40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7FDC0>, 'CREATE UNIQUE INDEX ix_images_uuid ON images (uuid)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7FDC0>, 'CREATE UNIQUE INDEX ix_images_uuid ON images (uuid)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7FDC0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7FDC0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7FC40>, 'CREATE INDEX ix_images_id ON images (id)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7FC40>, 'CREATE INDEX ix_images_id ON images (id)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7FC40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7FC40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7F4C0>, 'CREATE INDEX ix_images_client_id ON images (client_id)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7F4C0>, 'CREATE INDEX ix_images_client_id ON images (client_id)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7F4C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7F4C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7E7C0>, 'CREATE INDEX ix_images_processing_status ON images (processing_status)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95E7E7C0>, 'CREATE INDEX ix_images_processing_status ON images (processing_status)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7E7C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95E7E7C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F12B40>, 'INSERT INTO api_clients (id, name, api_key_hash, scopes, "plan", is_active, storage_used_bytes, quota_storage_mb, quota_images, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ('7d6dd0df-39da-4ab0-afd5-6d1a3b00cf5d', 'Admin Client', 'c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3', '["images:read", "images:write", "images:delete", "ai:use", "admin"]', 'PREMIUM', 1, 0, 500, 1000, '2026-02-25 16:33:10.650223', '2026-02-25 16:33:10.650226'))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F12B40>, 'INSERT INTO api_clients (id, name, api_key_hash, scopes, "plan", is_active, storage_used_bytes, quota_storage_mb, quota_images, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ('7d6dd0df-39da-4ab0-afd5-6d1a3b00cf5d', 'Admin Client', 'c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3', '["images:read", "images:write", "images:delete", "ai:use", "admin"]', 'PREMIUM', 1, 0, 500, 1000, '2026-02-25 16:33:10.650223', '2026-02-25 16:33:10.650226')) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F12B40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F12B40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F50540>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('7d6dd0df-39da-4ab0-afd5-6d1a3b00cf5d',))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F50540>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('7d6dd0df-39da-4ab0-afd5-6d1a3b00cf5d',)) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95F50540>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95F50540>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F50540>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F50540>) completed
---------------------------- Captured stdout call -----------------------------
2026-02-25T16:33:10.659644Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:10.659934Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:10.660279Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F51A40>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) [aiosqlite]
2026-02-25T16:33:10.660668Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F51A40>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) completed [aiosqlite]
2026-02-25T16:33:10.661131Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95F51A40>) [aiosqlite]
2026-02-25T16:33:10.661298Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95F51A40>) completed [aiosqlite]
2026-02-25T16:33:10.661545Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F51A40>) [aiosqlite]
2026-02-25T16:33:10.661684Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F51A40>) completed [aiosqlite]
2026-02-25T16:33:13.378073Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.378380Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.378756Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.378918Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
------------------------------ Captured log call ------------------------------
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F51A40>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA95F51A40>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95F51A40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA95F51A40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F51A40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA95F51A40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
-------------------------- Captured stdout teardown ---------------------------
2026-02-25T16:33:13.918842Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.919234Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.919738Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.920021Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.920935Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.921087Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.921296Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC440>, 'PRAGMA main.table_info("images")', ()) [aiosqlite]
2026-02-25T16:33:13.921472Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC440>, 'PRAGMA main.table_info("images")', ()) completed [aiosqlite]
2026-02-25T16:33:13.921682Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC440>) [aiosqlite]
2026-02-25T16:33:13.921854Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC440>) completed [aiosqlite]
2026-02-25T16:33:13.922046Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC440>) [aiosqlite]
2026-02-25T16:33:13.922175Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC440>) completed [aiosqlite]
2026-02-25T16:33:13.922572Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.922700Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.922967Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC740>, 'PRAGMA main.table_info("api_clients")', ()) [aiosqlite]
2026-02-25T16:33:13.923252Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC740>, 'PRAGMA main.table_info("api_clients")', ()) completed [aiosqlite]
2026-02-25T16:33:13.923582Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC740>) [aiosqlite]
2026-02-25T16:33:13.923724Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC740>) completed [aiosqlite]
2026-02-25T16:33:13.923991Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC740>) [aiosqlite]
2026-02-25T16:33:13.924267Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC740>) completed [aiosqlite]
2026-02-25T16:33:13.924824Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.925163Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.925488Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC4C0>, '\nDROP TABLE images', ()) [aiosqlite]
2026-02-25T16:33:13.925744Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC4C0>, '\nDROP TABLE images', ()) completed [aiosqlite]
2026-02-25T16:33:13.925980Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC4C0>) [aiosqlite]
2026-02-25T16:33:13.926123Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC4C0>) completed [aiosqlite]
2026-02-25T16:33:13.926516Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.926648Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.926868Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC840>, '\nDROP TABLE api_clients', ()) [aiosqlite]
2026-02-25T16:33:13.927069Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC840>, '\nDROP TABLE api_clients', ()) completed [aiosqlite]
2026-02-25T16:33:13.927303Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC840>) [aiosqlite]
2026-02-25T16:33:13.927430Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC840>) completed [aiosqlite]
2026-02-25T16:33:13.927814Z [debug ] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.927940Z [debug ] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.928178Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.928315Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.928782Z [debug ] Using proactor: IocpProactor [asyncio]
---------------------------- Captured log teardown ----------------------------
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC440>, 'PRAGMA main.table_info("images")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC440>, 'PRAGMA main.table_info("images")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC440>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC440>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC440>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC440>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC740>, 'PRAGMA main.table_info("api_clients")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC740>, 'PRAGMA main.table_info("api_clients")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC740>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC740>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC740>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC740>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC4C0>, '\nDROP TABLE images', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC4C0>, '\nDROP TABLE images', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC4C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC4C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC840>, '\nDROP TABLE api_clients', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC840>, '\nDROP TABLE api_clients', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC840>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC840>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG asyncio:proactor_events.py:633 Using proactor: IocpProactor
_________________________ test_admin_toggle_and_reset _________________________
async_client = <httpx.AsyncClient object at 0x000001AA95DFC180>
admin_headers = {'Authorization': 'Bearer test-key-admin-secret-000000'}
admin_client = <APIClient id=fda35f1f-be24-4e3d-b048-23a20ef11680 name=Admin Client plan=ClientPlan.PREMIUM>
@pytest.mark.asyncio
async def test_admin_toggle_and_reset(async_client: AsyncClient, admin_headers: dict, admin_client):
# Get all clients
resp = await async_client.get("/admin/api/clients", headers=admin_headers)
clients = resp.json()
client_id = clients[0]["id"]
is_active_initial = clients[0]["is_active"]
# Toggle
toggle_resp = await async_client.post(f"/admin/api/clients/{client_id}/toggle", headers=admin_headers)
assert toggle_resp.status_code == 200
assert toggle_resp.json()["is_active"] == (not is_active_initial)
# Reset Quota
reset_resp = await async_client.post(f"/admin/api/clients/{client_id}/reset-quota", headers=admin_headers)
> assert reset_resp.status_code == 200
E assert 401 == 200
E + where 401 = <Response [401 Unauthorized]>.status_code
tests\test_admin.py:48: AssertionError
---------------------------- Captured stdout setup ----------------------------
2026-02-25T16:33:13.930208Z [debug ] Using proactor: IocpProactor [asyncio]
2026-02-25T16:33:13.931207Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.931468Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.931706Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC5C0>, 'PRAGMA main.table_info("images")', ()) [aiosqlite]
2026-02-25T16:33:13.931859Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC5C0>, 'PRAGMA main.table_info("images")', ()) completed [aiosqlite]
2026-02-25T16:33:13.932060Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC5C0>) [aiosqlite]
2026-02-25T16:33:13.932187Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC5C0>) completed [aiosqlite]
2026-02-25T16:33:13.932390Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC5C0>) [aiosqlite]
2026-02-25T16:33:13.932518Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC5C0>) completed [aiosqlite]
2026-02-25T16:33:13.932886Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.933012Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.933285Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC6C0>, 'PRAGMA temp.table_info("images")', ()) [aiosqlite]
2026-02-25T16:33:13.933468Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC6C0>, 'PRAGMA temp.table_info("images")', ()) completed [aiosqlite]
2026-02-25T16:33:13.933718Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC6C0>) [aiosqlite]
2026-02-25T16:33:13.933866Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC6C0>) completed [aiosqlite]
2026-02-25T16:33:13.934079Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC6C0>) [aiosqlite]
2026-02-25T16:33:13.934210Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC6C0>) completed [aiosqlite]
2026-02-25T16:33:13.934539Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.934670Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.934884Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC940>, 'PRAGMA main.table_info("api_clients")', ()) [aiosqlite]
2026-02-25T16:33:13.935029Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC940>, 'PRAGMA main.table_info("api_clients")', ()) completed [aiosqlite]
2026-02-25T16:33:13.935228Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC940>) [aiosqlite]
2026-02-25T16:33:13.935355Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC940>) completed [aiosqlite]
2026-02-25T16:33:13.935545Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC940>) [aiosqlite]
2026-02-25T16:33:13.935669Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC940>) completed [aiosqlite]
2026-02-25T16:33:13.935936Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.936087Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.936294Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACA40>, 'PRAGMA temp.table_info("api_clients")', ()) [aiosqlite]
2026-02-25T16:33:13.936434Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACA40>, 'PRAGMA temp.table_info("api_clients")', ()) completed [aiosqlite]
2026-02-25T16:33:13.936661Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ACA40>) [aiosqlite]
2026-02-25T16:33:13.936784Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ACA40>) completed [aiosqlite]
2026-02-25T16:33:13.936998Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACA40>) [aiosqlite]
2026-02-25T16:33:13.937124Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACA40>) completed [aiosqlite]
2026-02-25T16:33:13.937703Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.937831Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.938032Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACAC0>, '\nCREATE TABLE api_clients (\n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(256) NOT NULL, \n\tapi_key_hash VARCHAR(64) NOT NULL, \n\tscopes JSON NOT NULL, \n\t"plan" VARCHAR(8) NOT NULL, \n\tis_active BOOLEAN NOT NULL, \n\tstorage_used_bytes BIGINT NOT NULL, \n\tquota_storage_mb INTEGER NOT NULL, \n\tquota_images INTEGER NOT NULL, \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id)\n)\n\n', ()) [aiosqlite]
2026-02-25T16:33:13.938293Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACAC0>, '\nCREATE TABLE api_clients (\n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(256) NOT NULL, \n\tapi_key_hash VARCHAR(64) NOT NULL, \n\tscopes JSON NOT NULL, \n\t"plan" VARCHAR(8) NOT NULL, \n\tis_active BOOLEAN NOT NULL, \n\tstorage_used_bytes BIGINT NOT NULL, \n\tquota_storage_mb INTEGER NOT NULL, \n\tquota_images INTEGER NOT NULL, \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id)\n)\n\n', ()) completed [aiosqlite]
2026-02-25T16:33:13.938528Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACAC0>) [aiosqlite]
2026-02-25T16:33:13.938655Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACAC0>) completed [aiosqlite]
2026-02-25T16:33:13.938916Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.939039Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.939239Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACBC0>, 'CREATE UNIQUE INDEX ix_api_clients_api_key_hash ON api_clients (api_key_hash)', ()) [aiosqlite]
2026-02-25T16:33:13.939432Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACBC0>, 'CREATE UNIQUE INDEX ix_api_clients_api_key_hash ON api_clients (api_key_hash)', ()) completed [aiosqlite]
2026-02-25T16:33:13.939641Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACBC0>) [aiosqlite]
2026-02-25T16:33:13.939772Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACBC0>) completed [aiosqlite]
2026-02-25T16:33:13.940006Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.940129Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.940325Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD5C0>, 'CREATE INDEX ix_api_clients_id ON api_clients (id)', ()) [aiosqlite]
2026-02-25T16:33:13.940510Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD5C0>, 'CREATE INDEX ix_api_clients_id ON api_clients (id)', ()) completed [aiosqlite]
2026-02-25T16:33:13.940719Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD5C0>) [aiosqlite]
2026-02-25T16:33:13.940844Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD5C0>) completed [aiosqlite]
2026-02-25T16:33:13.941370Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.941501Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.941723Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACB40>, '\nCREATE TABLE images (\n\tid INTEGER NOT NULL, \n\tuuid VARCHAR(36) NOT NULL, \n\tclient_id VARCHAR(36) NOT NULL, \n\toriginal_name VARCHAR(512) NOT NULL, \n\tfilename VARCHAR(512) NOT NULL, \n\tfile_path VARCHAR(1024) NOT NULL, \n\tthumbnail_path VARCHAR(1024), \n\tmime_type VARCHAR(128), \n\tfile_size BIGINT, \n\twidth INTEGER, \n\theight INTEGER, \n\tuploaded_at DATETIME, \n\tprocessing_status VARCHAR(10) NOT NULL, \n\tprocessing_error TEXT, \n\tprocessing_started_at DATETIME, \n\tprocessing_done_at DATETIME, \n\texif_raw JSON, \n\texif_make VARCHAR(256), \n\texif_model VARCHAR(256), \n\texif_lens VARCHAR(256), \n\texif_taken_at DATETIME, \n\texif_gps_lat FLOAT, \n\texif_gps_lon FLOAT, \n\texif_altitude FLOAT, \n\texif_iso INTEGER, \n\texif_aperture VARCHAR(32), \n\texif_shutter VARCHAR(32), \n\texif_focal VARCHAR(32), \n\texif_flash BOOLEAN, \n\texif_orientation INTEGER, \n\texif_software VARCHAR(256), \n\tocr_text TEXT, \n\tocr_language VARCHAR(64), \n\tocr_confidence FLOAT, \n\tocr_has_text BOOLEAN, \n\tai_description TEXT, \n\tai_tags JSON, \n\tai_confidence FLOAT, \n\tai_model_used VARCHAR(128), \n\tai_processed_at DATETIME, \n\tai_prompt_tokens INTEGER, \n\tai_output_tokens INTEGER, \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(client_id) REFERENCES api_clients (id)\n)\n\n', ()) [aiosqlite]
2026-02-25T16:33:13.942034Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACB40>, '\nCREATE TABLE images (\n\tid INTEGER NOT NULL, \n\tuuid VARCHAR(36) NOT NULL, \n\tclient_id VARCHAR(36) NOT NULL, \n\toriginal_name VARCHAR(512) NOT NULL, \n\tfilename VARCHAR(512) NOT NULL, \n\tfile_path VARCHAR(1024) NOT NULL, \n\tthumbnail_path VARCHAR(1024), \n\tmime_type VARCHAR(128), \n\tfile_size BIGINT, \n\twidth INTEGER, \n\theight INTEGER, \n\tuploaded_at DATETIME, \n\tprocessing_status VARCHAR(10) NOT NULL, \n\tprocessing_error TEXT, \n\tprocessing_started_at DATETIME, \n\tprocessing_done_at DATETIME, \n\texif_raw JSON, \n\texif_make VARCHAR(256), \n\texif_model VARCHAR(256), \n\texif_lens VARCHAR(256), \n\texif_taken_at DATETIME, \n\texif_gps_lat FLOAT, \n\texif_gps_lon FLOAT, \n\texif_altitude FLOAT, \n\texif_iso INTEGER, \n\texif_aperture VARCHAR(32), \n\texif_shutter VARCHAR(32), \n\texif_focal VARCHAR(32), \n\texif_flash BOOLEAN, \n\texif_orientation INTEGER, \n\texif_software VARCHAR(256), \n\tocr_text TEXT, \n\tocr_language VARCHAR(64), \n\tocr_confidence FLOAT, \n\tocr_has_text BOOLEAN, \n\tai_description TEXT, \n\tai_tags JSON, \n\tai_confidence FLOAT, \n\tai_model_used VARCHAR(128), \n\tai_processed_at DATETIME, \n\tai_prompt_tokens INTEGER, \n\tai_output_tokens INTEGER, \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(client_id) REFERENCES api_clients (id)\n)\n\n', ()) completed [aiosqlite]
2026-02-25T16:33:13.942302Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACB40>) [aiosqlite]
2026-02-25T16:33:13.942431Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACB40>) completed [aiosqlite]
2026-02-25T16:33:13.942677Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.942803Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.943001Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD4C0>, 'CREATE UNIQUE INDEX ix_images_uuid ON images (uuid)', ()) [aiosqlite]
2026-02-25T16:33:13.943190Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD4C0>, 'CREATE UNIQUE INDEX ix_images_uuid ON images (uuid)', ()) completed [aiosqlite]
2026-02-25T16:33:13.943403Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD4C0>) [aiosqlite]
2026-02-25T16:33:13.943528Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD4C0>) completed [aiosqlite]
2026-02-25T16:33:13.943760Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.943883Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.944076Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD0C0>, 'CREATE INDEX ix_images_id ON images (id)', ()) [aiosqlite]
2026-02-25T16:33:13.944257Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD0C0>, 'CREATE INDEX ix_images_id ON images (id)', ()) completed [aiosqlite]
2026-02-25T16:33:13.944457Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD0C0>) [aiosqlite]
2026-02-25T16:33:13.944581Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD0C0>) completed [aiosqlite]
2026-02-25T16:33:13.944807Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.944932Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.945128Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACF40>, 'CREATE INDEX ix_images_client_id ON images (client_id)', ()) [aiosqlite]
2026-02-25T16:33:13.945310Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACF40>, 'CREATE INDEX ix_images_client_id ON images (client_id)', ()) completed [aiosqlite]
2026-02-25T16:33:13.945511Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACF40>) [aiosqlite]
2026-02-25T16:33:13.945635Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACF40>) completed [aiosqlite]
2026-02-25T16:33:13.945860Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.945994Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.946186Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACE40>, 'CREATE INDEX ix_images_processing_status ON images (processing_status)', ()) [aiosqlite]
2026-02-25T16:33:13.946369Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACE40>, 'CREATE INDEX ix_images_processing_status ON images (processing_status)', ()) completed [aiosqlite]
2026-02-25T16:33:13.946578Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACE40>) [aiosqlite]
2026-02-25T16:33:13.946712Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACE40>) completed [aiosqlite]
2026-02-25T16:33:13.947063Z [debug ] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.947189Z [debug ] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.947495Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.947623Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.949097Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.949260Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.949636Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD940>, 'INSERT INTO api_clients (id, name, api_key_hash, scopes, "plan", is_active, storage_used_bytes, quota_storage_mb, quota_images, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ('fda35f1f-be24-4e3d-b048-23a20ef11680', 'Admin Client', 'c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3', '["images:read", "images:write", "images:delete", "ai:use", "admin"]', 'PREMIUM', 1, 0, 500, 1000, '2026-02-25 16:33:13.948997', '2026-02-25 16:33:13.948998')) [aiosqlite]
2026-02-25T16:33:13.949983Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD940>, 'INSERT INTO api_clients (id, name, api_key_hash, scopes, "plan", is_active, storage_used_bytes, quota_storage_mb, quota_images, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ('fda35f1f-be24-4e3d-b048-23a20ef11680', 'Admin Client', 'c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3', '["images:read", "images:write", "images:delete", "ai:use", "admin"]', 'PREMIUM', 1, 0, 500, 1000, '2026-02-25 16:33:13.948997', '2026-02-25 16:33:13.948998')) completed [aiosqlite]
2026-02-25T16:33:13.950422Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD940>) [aiosqlite]
2026-02-25T16:33:13.950652Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD940>) completed [aiosqlite]
2026-02-25T16:33:13.951080Z [debug ] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.951300Z [debug ] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.951637Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.951874Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.952486Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.952627Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.952840Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ADC40>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('fda35f1f-be24-4e3d-b048-23a20ef11680',)) [aiosqlite]
2026-02-25T16:33:13.953029Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ADC40>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('fda35f1f-be24-4e3d-b048-23a20ef11680',)) completed [aiosqlite]
2026-02-25T16:33:13.953243Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ADC40>) [aiosqlite]
2026-02-25T16:33:13.953379Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ADC40>) completed [aiosqlite]
2026-02-25T16:33:13.953565Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ADC40>) [aiosqlite]
2026-02-25T16:33:13.953699Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ADC40>) completed [aiosqlite]
----------------------------- Captured log setup ------------------------------
DEBUG asyncio:proactor_events.py:633 Using proactor: IocpProactor
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC5C0>, 'PRAGMA main.table_info("images")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC5C0>, 'PRAGMA main.table_info("images")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC5C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC5C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC5C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC5C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC6C0>, 'PRAGMA temp.table_info("images")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC6C0>, 'PRAGMA temp.table_info("images")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC6C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC6C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC6C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC6C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC940>, 'PRAGMA main.table_info("api_clients")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AC940>, 'PRAGMA main.table_info("api_clients")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC940>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AC940>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC940>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AC940>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACA40>, 'PRAGMA temp.table_info("api_clients")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACA40>, 'PRAGMA temp.table_info("api_clients")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ACA40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ACA40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACA40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACA40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACAC0>, '\nCREATE TABLE api_clients (\n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(256) NOT NULL, \n\tapi_key_hash VARCHAR(64) NOT NULL, \n\tscopes JSON NOT NULL, \n\t"plan" VARCHAR(8) NOT NULL, \n\tis_active BOOLEAN NOT NULL, \n\tstorage_used_bytes BIGINT NOT NULL, \n\tquota_storage_mb INTEGER NOT NULL, \n\tquota_images INTEGER NOT NULL, \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id)\n)\n\n', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACAC0>, '\nCREATE TABLE api_clients (\n\tid VARCHAR(36) NOT NULL, \n\tname VARCHAR(256) NOT NULL, \n\tapi_key_hash VARCHAR(64) NOT NULL, \n\tscopes JSON NOT NULL, \n\t"plan" VARCHAR(8) NOT NULL, \n\tis_active BOOLEAN NOT NULL, \n\tstorage_used_bytes BIGINT NOT NULL, \n\tquota_storage_mb INTEGER NOT NULL, \n\tquota_images INTEGER NOT NULL, \n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tPRIMARY KEY (id)\n)\n\n', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACAC0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACAC0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACBC0>, 'CREATE UNIQUE INDEX ix_api_clients_api_key_hash ON api_clients (api_key_hash)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACBC0>, 'CREATE UNIQUE INDEX ix_api_clients_api_key_hash ON api_clients (api_key_hash)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACBC0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACBC0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD5C0>, 'CREATE INDEX ix_api_clients_id ON api_clients (id)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD5C0>, 'CREATE INDEX ix_api_clients_id ON api_clients (id)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD5C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD5C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACB40>, '\nCREATE TABLE images (\n\tid INTEGER NOT NULL, \n\tuuid VARCHAR(36) NOT NULL, \n\tclient_id VARCHAR(36) NOT NULL, \n\toriginal_name VARCHAR(512) NOT NULL, \n\tfilename VARCHAR(512) NOT NULL, \n\tfile_path VARCHAR(1024) NOT NULL, \n\tthumbnail_path VARCHAR(1024), \n\tmime_type VARCHAR(128), \n\tfile_size BIGINT, \n\twidth INTEGER, \n\theight INTEGER, \n\tuploaded_at DATETIME, \n\tprocessing_status VARCHAR(10) NOT NULL, \n\tprocessing_error TEXT, \n\tprocessing_started_at DATETIME, \n\tprocessing_done_at DATETIME, \n\texif_raw JSON, \n\texif_make VARCHAR(256), \n\texif_model VARCHAR(256), \n\texif_lens VARCHAR(256), \n\texif_taken_at DATETIME, \n\texif_gps_lat FLOAT, \n\texif_gps_lon FLOAT, \n\texif_altitude FLOAT, \n\texif_iso INTEGER, \n\texif_aperture VARCHAR(32), \n\texif_shutter VARCHAR(32), \n\texif_focal VARCHAR(32), \n\texif_flash BOOLEAN, \n\texif_orientation INTEGER, \n\texif_software VARCHAR(256), \n\tocr_text TEXT, \n\tocr_language VARCHAR(64), \n\tocr_confidence FLOAT, \n\tocr_has_text BOOLEAN, \n\tai_description TEXT, \n\tai_tags JSON, \n\tai_confidence FLOAT, \n\tai_model_used VARCHAR(128), \n\tai_processed_at DATETIME, \n\tai_prompt_tokens INTEGER, \n\tai_output_tokens INTEGER, \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(client_id) REFERENCES api_clients (id)\n)\n\n', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACB40>, '\nCREATE TABLE images (\n\tid INTEGER NOT NULL, \n\tuuid VARCHAR(36) NOT NULL, \n\tclient_id VARCHAR(36) NOT NULL, \n\toriginal_name VARCHAR(512) NOT NULL, \n\tfilename VARCHAR(512) NOT NULL, \n\tfile_path VARCHAR(1024) NOT NULL, \n\tthumbnail_path VARCHAR(1024), \n\tmime_type VARCHAR(128), \n\tfile_size BIGINT, \n\twidth INTEGER, \n\theight INTEGER, \n\tuploaded_at DATETIME, \n\tprocessing_status VARCHAR(10) NOT NULL, \n\tprocessing_error TEXT, \n\tprocessing_started_at DATETIME, \n\tprocessing_done_at DATETIME, \n\texif_raw JSON, \n\texif_make VARCHAR(256), \n\texif_model VARCHAR(256), \n\texif_lens VARCHAR(256), \n\texif_taken_at DATETIME, \n\texif_gps_lat FLOAT, \n\texif_gps_lon FLOAT, \n\texif_altitude FLOAT, \n\texif_iso INTEGER, \n\texif_aperture VARCHAR(32), \n\texif_shutter VARCHAR(32), \n\texif_focal VARCHAR(32), \n\texif_flash BOOLEAN, \n\texif_orientation INTEGER, \n\texif_software VARCHAR(256), \n\tocr_text TEXT, \n\tocr_language VARCHAR(64), \n\tocr_confidence FLOAT, \n\tocr_has_text BOOLEAN, \n\tai_description TEXT, \n\tai_tags JSON, \n\tai_confidence FLOAT, \n\tai_model_used VARCHAR(128), \n\tai_processed_at DATETIME, \n\tai_prompt_tokens INTEGER, \n\tai_output_tokens INTEGER, \n\tPRIMARY KEY (id), \n\tFOREIGN KEY(client_id) REFERENCES api_clients (id)\n)\n\n', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACB40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACB40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD4C0>, 'CREATE UNIQUE INDEX ix_images_uuid ON images (uuid)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD4C0>, 'CREATE UNIQUE INDEX ix_images_uuid ON images (uuid)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD4C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD4C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD0C0>, 'CREATE INDEX ix_images_id ON images (id)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD0C0>, 'CREATE INDEX ix_images_id ON images (id)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD0C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD0C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACF40>, 'CREATE INDEX ix_images_client_id ON images (client_id)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACF40>, 'CREATE INDEX ix_images_client_id ON images (client_id)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACF40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACF40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACE40>, 'CREATE INDEX ix_images_processing_status ON images (processing_status)', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACE40>, 'CREATE INDEX ix_images_processing_status ON images (processing_status)', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACE40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACE40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD940>, 'INSERT INTO api_clients (id, name, api_key_hash, scopes, "plan", is_active, storage_used_bytes, quota_storage_mb, quota_images, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ('fda35f1f-be24-4e3d-b048-23a20ef11680', 'Admin Client', 'c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3', '["images:read", "images:write", "images:delete", "ai:use", "admin"]', 'PREMIUM', 1, 0, 500, 1000, '2026-02-25 16:33:13.948997', '2026-02-25 16:33:13.948998'))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AD940>, 'INSERT INTO api_clients (id, name, api_key_hash, scopes, "plan", is_active, storage_used_bytes, quota_storage_mb, quota_images, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ('fda35f1f-be24-4e3d-b048-23a20ef11680', 'Admin Client', 'c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3', '["images:read", "images:write", "images:delete", "ai:use", "admin"]', 'PREMIUM', 1, 0, 500, 1000, '2026-02-25 16:33:13.948997', '2026-02-25 16:33:13.948998')) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD940>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AD940>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ADC40>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('fda35f1f-be24-4e3d-b048-23a20ef11680',))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ADC40>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('fda35f1f-be24-4e3d-b048-23a20ef11680',)) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ADC40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ADC40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ADC40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ADC40>) completed
---------------------------- Captured stdout call -----------------------------
2026-02-25T16:33:13.956273Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.956478Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.956718Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE8C0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) [aiosqlite]
2026-02-25T16:33:13.957042Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE8C0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) completed [aiosqlite]
2026-02-25T16:33:13.957385Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE8C0>) [aiosqlite]
2026-02-25T16:33:13.957603Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE8C0>) completed [aiosqlite]
2026-02-25T16:33:13.957880Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE8C0>) [aiosqlite]
2026-02-25T16:33:13.958004Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE8C0>) completed [aiosqlite]
2026-02-25T16:33:13.958594Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.958728Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.958976Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACDC0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients ORDER BY api_clients.created_at DESC', ()) [aiosqlite]
2026-02-25T16:33:13.959180Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACDC0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients ORDER BY api_clients.created_at DESC', ()) completed [aiosqlite]
2026-02-25T16:33:13.959430Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ACDC0>) [aiosqlite]
2026-02-25T16:33:13.959562Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ACDC0>) completed [aiosqlite]
2026-02-25T16:33:13.959800Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACDC0>) [aiosqlite]
2026-02-25T16:33:13.959925Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACDC0>) completed [aiosqlite]
2026-02-25T16:33:13.960488Z [debug ] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.960621Z [debug ] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.960869Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.960994Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.961548Z [info ] http.request [http] client_id=anonymous duration_ms=6 method=GET path=/admin/api/clients status=200
2026-02-25T16:33:13.964128Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.964354Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.964660Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AF040>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) [aiosqlite]
2026-02-25T16:33:13.964929Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AF040>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) completed [aiosqlite]
2026-02-25T16:33:13.965204Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AF040>) [aiosqlite]
2026-02-25T16:33:13.965336Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AF040>) completed [aiosqlite]
2026-02-25T16:33:13.965534Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AF040>) [aiosqlite]
2026-02-25T16:33:13.965656Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AF040>) completed [aiosqlite]
2026-02-25T16:33:13.966591Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.966727Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.966934Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE1C0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('fda35f1f-be24-4e3d-b048-23a20ef11680',)) [aiosqlite]
2026-02-25T16:33:13.967113Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE1C0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('fda35f1f-be24-4e3d-b048-23a20ef11680',)) completed [aiosqlite]
2026-02-25T16:33:13.967360Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE1C0>) [aiosqlite]
2026-02-25T16:33:13.967498Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE1C0>) completed [aiosqlite]
2026-02-25T16:33:13.967693Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE1C0>) [aiosqlite]
2026-02-25T16:33:13.967817Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE1C0>) completed [aiosqlite]
2026-02-25T16:33:13.969003Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.969133Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.969342Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AEF40>, 'UPDATE api_clients SET is_active=?, updated_at=? WHERE api_clients.id = ?', (0, '2026-02-25 16:33:13.968923', 'fda35f1f-be24-4e3d-b048-23a20ef11680')) [aiosqlite]
2026-02-25T16:33:13.969518Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AEF40>, 'UPDATE api_clients SET is_active=?, updated_at=? WHERE api_clients.id = ?', (0, '2026-02-25 16:33:13.968923', 'fda35f1f-be24-4e3d-b048-23a20ef11680')) completed [aiosqlite]
2026-02-25T16:33:13.969721Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AEF40>) [aiosqlite]
2026-02-25T16:33:13.969845Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AEF40>) completed [aiosqlite]
2026-02-25T16:33:13.970211Z [debug ] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.970477Z [debug ] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.970804Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.970935Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.971403Z [info ] http.request [http] client_id=anonymous duration_ms=8 method=POST path=/admin/api/clients/fda35f1f-be24-4e3d-b048-23a20ef11680/toggle status=200
2026-02-25T16:33:13.973600Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.973823Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.974130Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA97093840>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) [aiosqlite]
2026-02-25T16:33:13.974401Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA97093840>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) completed [aiosqlite]
2026-02-25T16:33:13.974735Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA97093840>) [aiosqlite]
2026-02-25T16:33:13.974865Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA97093840>) completed [aiosqlite]
2026-02-25T16:33:13.975067Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA97093840>) [aiosqlite]
2026-02-25T16:33:13.975189Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA97093840>) completed [aiosqlite]
2026-02-25T16:33:13.975507Z [warning ] Tentative d'authentification avec un client inactif: fda35f1f-be24-4e3d-b048-23a20ef11680 [app.dependencies.auth]
2026-02-25T16:33:13.975723Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.975848Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.976108Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.976231Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.976637Z [info ] http.request [http] client_id=anonymous duration_ms=4 method=POST path=/admin/api/clients/fda35f1f-be24-4e3d-b048-23a20ef11680/reset-quota status=401
------------------------------ Captured log call ------------------------------
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE8C0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE8C0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE8C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE8C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE8C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE8C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACDC0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients ORDER BY api_clients.created_at DESC', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971ACDC0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients ORDER BY api_clients.created_at DESC', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ACDC0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971ACDC0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACDC0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971ACDC0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
INFO http:logging_middleware.py:30 http.request
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AF040>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AF040>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AF040>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AF040>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AF040>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AF040>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE1C0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('fda35f1f-be24-4e3d-b048-23a20ef11680',))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE1C0>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.id = ?', ('fda35f1f-be24-4e3d-b048-23a20ef11680',)) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE1C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE1C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE1C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE1C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AEF40>, 'UPDATE api_clients SET is_active=?, updated_at=? WHERE api_clients.id = ?', (0, '2026-02-25 16:33:13.968923', 'fda35f1f-be24-4e3d-b048-23a20ef11680'))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AEF40>, 'UPDATE api_clients SET is_active=?, updated_at=? WHERE api_clients.id = ?', (0, '2026-02-25 16:33:13.968923', 'fda35f1f-be24-4e3d-b048-23a20ef11680')) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AEF40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AEF40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
INFO http:logging_middleware.py:30 http.request
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA97093840>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',))
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA97093840>, 'SELECT api_clients.id, api_clients.name, api_clients.api_key_hash, api_clients.scopes, api_clients."plan", api_clients.is_active, api_clients.storage_used_bytes, api_clients.quota_storage_mb, api_clients.quota_images, api_clients.created_at, api_clients.updated_at \nFROM api_clients \nWHERE api_clients.api_key_hash = ?', ('c6e381716a2ad0d836108de34e875a96fbae33a0d5cd9d801cb8c235d5d188d3',)) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA97093840>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA97093840>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA97093840>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA97093840>) completed
WARNING app.dependencies.auth:auth.py:92 Tentative d'authentification avec un client inactif: fda35f1f-be24-4e3d-b048-23a20ef11680
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
INFO http:logging_middleware.py:30 http.request
-------------------------- Captured stdout teardown ---------------------------
2026-02-25T16:33:13.980663Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.980990Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.981313Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.981542Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.982129Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.982284Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.982570Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE840>, 'PRAGMA main.table_info("images")', ()) [aiosqlite]
2026-02-25T16:33:13.982895Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE840>, 'PRAGMA main.table_info("images")', ()) completed [aiosqlite]
2026-02-25T16:33:13.983250Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE840>) [aiosqlite]
2026-02-25T16:33:13.983415Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE840>) completed [aiosqlite]
2026-02-25T16:33:13.983612Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE840>) [aiosqlite]
2026-02-25T16:33:13.983748Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE840>) completed [aiosqlite]
2026-02-25T16:33:13.984062Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.984204Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.984401Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE0C0>, 'PRAGMA main.table_info("api_clients")', ()) [aiosqlite]
2026-02-25T16:33:13.984548Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE0C0>, 'PRAGMA main.table_info("api_clients")', ()) completed [aiosqlite]
2026-02-25T16:33:13.984746Z [debug ] executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE0C0>) [aiosqlite]
2026-02-25T16:33:13.984882Z [debug ] operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE0C0>) completed [aiosqlite]
2026-02-25T16:33:13.985068Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE0C0>) [aiosqlite]
2026-02-25T16:33:13.985190Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE0C0>) completed [aiosqlite]
2026-02-25T16:33:13.985502Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.985625Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.985819Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE940>, '\nDROP TABLE images', ()) [aiosqlite]
2026-02-25T16:33:13.986059Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE940>, '\nDROP TABLE images', ()) completed [aiosqlite]
2026-02-25T16:33:13.986262Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE940>) [aiosqlite]
2026-02-25T16:33:13.986395Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE940>) completed [aiosqlite]
2026-02-25T16:33:13.986697Z [debug ] executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.986829Z [debug ] operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.987023Z [debug ] executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AF1C0>, '\nDROP TABLE api_clients', ()) [aiosqlite]
2026-02-25T16:33:13.987229Z [debug ] operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AF1C0>, '\nDROP TABLE api_clients', ()) completed [aiosqlite]
2026-02-25T16:33:13.987450Z [debug ] executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AF1C0>) [aiosqlite]
2026-02-25T16:33:13.987574Z [debug ] operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AF1C0>) completed [aiosqlite]
2026-02-25T16:33:13.987888Z [debug ] executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.988015Z [debug ] operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.988250Z [debug ] executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) [aiosqlite]
2026-02-25T16:33:13.988372Z [debug ] operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed [aiosqlite]
2026-02-25T16:33:13.988828Z [debug ] Using proactor: IocpProactor [asyncio]
---------------------------- Captured log teardown ----------------------------
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE840>, 'PRAGMA main.table_info("images")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE840>, 'PRAGMA main.table_info("images")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE840>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE840>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE840>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE840>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE0C0>, 'PRAGMA main.table_info("api_clients")', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE0C0>, 'PRAGMA main.table_info("api_clients")', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE0C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method fetchall of sqlite3.Cursor object at 0x000001AA971AE0C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE0C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE0C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE940>, '\nDROP TABLE images', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AE940>, '\nDROP TABLE images', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE940>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AE940>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method cursor of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AF1C0>, '\nDROP TABLE api_clients', ())
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method execute of sqlite3.Cursor object at 0x000001AA971AF1C0>, '\nDROP TABLE api_clients', ()) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AF1C0>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method close of sqlite3.Cursor object at 0x000001AA971AF1C0>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method commit of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG aiosqlite:core.py:114 executing functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>)
DEBUG aiosqlite:core.py:116 operation functools.partial(<built-in method rollback of sqlite3.Connection object at 0x000001AA95DF6D40>) completed
DEBUG asyncio:proactor_events.py:633 Using proactor: IocpProactor
============================== warnings summary ===============================
..\..\..\..\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\config\__init__.py:1441
C:\Users\bruno\scoop\apps\python\current\Lib\site-packages\_pytest\config\__init__.py:1441: PytestConfigWarning: Unknown config option: env
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ===========================
FAILED tests/test_admin.py::test_admin_queue_status - redis.exceptions.Connec...
FAILED tests/test_admin.py::test_admin_toggle_and_reset - assert 401 == 200
=================== 2 failed, 2 passed, 1 warning in 3.52s ====================