Fix some stuff

This commit is contained in:
2025-10-28 16:57:25 +09:00
parent 1a097a8f7b
commit 3bd7341ecc
6 changed files with 19 additions and 26 deletions

View File

@ -7,21 +7,18 @@ namespace Hcs.WebApp.BackgroundServices
{
private readonly ConcurrentQueue<Campaign> campaigns = new();
public event Action<Campaign> OnCampaignStarted;
public event Action<Campaign> OnCampaignCreated;
public void EnqueueCampaign(Campaign campaign)
{
campaigns.Enqueue(campaign);
OnCampaignCreated?.Invoke(campaign);
}
public bool TryDequeueCampaign(out Campaign campaign)
{
return campaigns.TryDequeue(out campaign);
}
public void InvokeOnCampaignStarted(Campaign campaign)
{
OnCampaignStarted?.Invoke(campaign);
}
}
}