Fix some stuff
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user