Initial v6 version #32

Manually merged
toastie_t0ast merged 54 commits from v6-dev into v6 2025-02-28 23:18:39 +00:00
Showing only changes of commit 4c572d25d8 - Show all commits

View file

@ -108,7 +108,8 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor
_shardData.ShardId))
.Where(gc => gc.DeleteStreamOnlineMessage)
.Select(x => x.GuildId)
.ToListAsyncLinqToDB();
.ToListAsyncLinqToDB()
.Fmap(x => x.ToConcurrentSet());
foreach (var guildId in deleteOnOffline)
_deleteOnOfflineServers.Add(guildId);
@ -151,11 +152,11 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor
public async Task OnReadyAsync()
{
await InitStateAsync();
if (_client.ShardId != 0)
return;
await InitStateAsync();
using var timer = new PeriodicTimer(TimeSpan.FromMinutes(30));
while (await timer.WaitForNextTickAsync())
{
@ -359,7 +360,6 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor
.Select(x => x.NotifyStreamOffline)
.FirstOrDefaultAsyncLinqToDB();
// todo hashset
if (notifyOffline)
_offlineNotificationServers.Add(guild.Id);