Changes
This commit is contained in:
parent
53179abfbb
commit
4c572d25d8
1 changed files with 4 additions and 4 deletions
|
@ -108,7 +108,8 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor
|
||||||
_shardData.ShardId))
|
_shardData.ShardId))
|
||||||
.Where(gc => gc.DeleteStreamOnlineMessage)
|
.Where(gc => gc.DeleteStreamOnlineMessage)
|
||||||
.Select(x => x.GuildId)
|
.Select(x => x.GuildId)
|
||||||
.ToListAsyncLinqToDB();
|
.ToListAsyncLinqToDB()
|
||||||
|
.Fmap(x => x.ToConcurrentSet());
|
||||||
|
|
||||||
foreach (var guildId in deleteOnOffline)
|
foreach (var guildId in deleteOnOffline)
|
||||||
_deleteOnOfflineServers.Add(guildId);
|
_deleteOnOfflineServers.Add(guildId);
|
||||||
|
@ -151,11 +152,11 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor
|
||||||
|
|
||||||
public async Task OnReadyAsync()
|
public async Task OnReadyAsync()
|
||||||
{
|
{
|
||||||
|
await InitStateAsync();
|
||||||
|
|
||||||
if (_client.ShardId != 0)
|
if (_client.ShardId != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
await InitStateAsync();
|
|
||||||
|
|
||||||
using var timer = new PeriodicTimer(TimeSpan.FromMinutes(30));
|
using var timer = new PeriodicTimer(TimeSpan.FromMinutes(30));
|
||||||
while (await timer.WaitForNextTickAsync())
|
while (await timer.WaitForNextTickAsync())
|
||||||
{
|
{
|
||||||
|
@ -359,7 +360,6 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor
|
||||||
.Select(x => x.NotifyStreamOffline)
|
.Select(x => x.NotifyStreamOffline)
|
||||||
.FirstOrDefaultAsyncLinqToDB();
|
.FirstOrDefaultAsyncLinqToDB();
|
||||||
|
|
||||||
// todo hashset
|
|
||||||
if (notifyOffline)
|
if (notifyOffline)
|
||||||
_offlineNotificationServers.Add(guild.Id);
|
_offlineNotificationServers.Add(guild.Id);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue