|
@@ -35,7 +35,7 @@ namespace molilian.core
|
|
|
if (string.IsNullOrEmpty(redisServer)) return 0;
|
|
if (string.IsNullOrEmpty(redisServer)) return 0;
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
- await using var scope = RedisClientFactory.CreateScope(redisServer);
|
|
|
|
|
|
|
+ await using var scope = await RedisClientFactory.CreateScopeAsync(redisServer);
|
|
|
return BatchInsertLogDB(limit, scope.Client);
|
|
return BatchInsertLogDB(limit, scope.Client);
|
|
|
}
|
|
}
|
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
@@ -527,7 +527,7 @@ namespace molilian.core
|
|
|
|
|
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
- await using var scope = RedisClientFactory.CreateScope(redisServer);
|
|
|
|
|
|
|
+ await using var scope = await RedisClientFactory.CreateScopeAsync(redisServer);
|
|
|
return await scope.Client.GetAsync<int>(keyname);
|
|
return await scope.Client.GetAsync<int>(keyname);
|
|
|
}
|
|
}
|
|
|
catch (Exception)
|
|
catch (Exception)
|
|
@@ -558,7 +558,7 @@ namespace molilian.core
|
|
|
var redisServer = EndPointCore.GetRedisServer(node);
|
|
var redisServer = EndPointCore.GetRedisServer(node);
|
|
|
if (string.IsNullOrEmpty(redisServer)) return [];
|
|
if (string.IsNullOrEmpty(redisServer)) return [];
|
|
|
|
|
|
|
|
- using var scope = RedisClientFactory.CreateScope(redisServer);
|
|
|
|
|
|
|
+ using var scope = await RedisClientFactory.CreateScopeAsync(redisServer);
|
|
|
return await scope.Client.SMembersAsync<string>(keyname);
|
|
return await scope.Client.SMembersAsync<string>(keyname);
|
|
|
}
|
|
}
|
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|