Merge pull request #97 from adator85/asyncio

Fix some asyncio issues!
This commit is contained in:
adator
2025-11-21 00:56:24 +01:00
committed by GitHub
5 changed files with 11 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ class Loader:
self.PFactory: factory.ProtocolFactorty = factory.ProtocolFactorty(self)
self.RpcServer: rpc_mod.JSonRpcServer = rpc_mod.JSonRpcServer(self)
self.RpcServer: rpc_mod.JSonRpcServer = rpc_mod.JSonRpcServer(self, hostname='0.0.0.0')
self.Logs.debug(self.Utils.tr("Loader %s success", __name__))

View File

@@ -15,7 +15,7 @@ async def coro_cloudfilt_scan(uplink: 'Defender'):
while uplink.cloudfilt_isRunning:
list_to_remove:list = []
for user in uplink.Schemas.DB_CLOUDFILT_USERS:
uplink.mod_utils.action_scan_client_with_cloudfilt(uplink, user)
await uplink.mod_utils.action_scan_client_with_cloudfilt(uplink, user)
list_to_remove.append(user)
await asyncio.sleep(1)
@@ -30,7 +30,7 @@ async def coro_freeipapi_scan(uplink: 'Defender'):
list_to_remove: list = []
for user in uplink.Schemas.DB_FREEIPAPI_USERS:
uplink.mod_utils.action_scan_client_with_freeipapi(uplink, user)
await uplink.mod_utils.action_scan_client_with_freeipapi(uplink, user)
list_to_remove.append(user)
await asyncio.sleep(1)
@@ -44,11 +44,13 @@ async def coro_abuseipdb_scan(uplink: 'Defender'):
while uplink.abuseipdb_isRunning:
list_to_remove: list = []
print(uplink.Schemas.DB_ABUSEIPDB_USERS)
for user in uplink.Schemas.DB_ABUSEIPDB_USERS:
uplink.mod_utils.action_scan_client_with_abuseipdb(uplink, user)
await uplink.mod_utils.action_scan_client_with_abuseipdb(uplink, user)
list_to_remove.append(user)
await asyncio.sleep(1)
print(list_to_remove)
for user_model in list_to_remove:
uplink.Schemas.DB_ABUSEIPDB_USERS.remove(user_model)
@@ -59,7 +61,7 @@ async def coro_local_scan(uplink: 'Defender'):
while uplink.localscan_isRunning:
list_to_remove:list = []
for user in uplink.Schemas.DB_LOCALSCAN_USERS:
uplink.mod_utils.action_scan_client_with_local_socket(uplink, user)
await uplink.mod_utils.action_scan_client_with_local_socket(uplink, user)
list_to_remove.append(user)
await asyncio.sleep(1)
@@ -74,7 +76,7 @@ async def coro_psutil_scan(uplink: 'Defender'):
list_to_remove:list = []
for user in uplink.Schemas.DB_PSUTIL_USERS:
uplink.mod_utils.action_scan_client_with_psutil(uplink, user)
await uplink.mod_utils.action_scan_client_with_psutil(uplink, user)
list_to_remove.append(user)
await asyncio.sleep(1)

View File

@@ -84,7 +84,7 @@ class Jsonrpc(IModule):
await self.sync_db()
if self.ctx.Config.SERVEUR_PROTOCOL.lower() != 'unreal6':
self.ctx.ModuleUtils.unload_one_module(self.module_name, False)
await self.ctx.ModuleUtils.unload_one_module(self.module_name, False)
return None
# Is RPC Active?

View File

@@ -3,6 +3,6 @@ psutil==7.1.2
PyYAML==6.0.3
requests==2.32.5
SQLAlchemy==2.0.44
unrealircd_rpc_py==3.0.2
unrealircd_rpc_py==3.0.4
starlette==0.50.0
uvicorn==0.38.0

View File

@@ -3,7 +3,7 @@
"requests": "2.32.5",
"psutil": "7.1.2",
"unrealircd_rpc_py": "3.0.3",
"unrealircd_rpc_py": "3.0.4",
"sqlalchemy": "2.0.44",
"faker": "37.12.0",
"pyyaml": "6.0.3",