Lint and format the code

This commit is contained in:
nicolargo 2026-01-02 18:07:28 +01:00
parent 7160cd8ae4
commit 91279b9144
4 changed files with 4 additions and 4 deletions

View File

@ -156,10 +156,7 @@ class GlancesExportAsyncio(GlancesExport):
# Submit the export operation to the background event loop
try:
future = asyncio.run_coroutine_threadsafe(
self._async_export(name, columns, points),
self.loop
)
future = asyncio.run_coroutine_threadsafe(self._async_export(name, columns, points), self.loop)
# Don't block forever - use a short timeout
future.result(timeout=1)
except asyncio.TimeoutError:

View File

@ -130,4 +130,5 @@ class Export(GlancesExportAsyncio):
logger.error(f"NATS Unexpected error publishing {subject_name}: {e}", exc_info=True)
raise
# End of glances/exports/glances_nats/__init__.py

View File

@ -11,6 +11,7 @@ async def main():
await nc.publish("glances.test", b'A test')
await nc.flush()
if __name__ == '__main__':
asyncio.run(main())

View File

@ -25,6 +25,7 @@ async def main():
await nc.close()
if __name__ == '__main__':
asyncio.run(main())