mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 13:54:36 +00:00
Modify background task settings
Solves an issue in which the bot lags on all input when the bot has been fully initialized.
This commit is contained in:
parent
6ee0ad939e
commit
7ce04997f9
1 changed files with 2 additions and 3 deletions
|
@ -13,7 +13,7 @@ namespace BirthdayBot.BackgroundServices
|
|||
/// <summary>
|
||||
/// The interval, in seconds, in which background tasks are attempted to be run within a shard.
|
||||
/// </summary>
|
||||
public const int Interval = 20;
|
||||
public const int Interval = 40;
|
||||
|
||||
private readonly Task _workerTask;
|
||||
private readonly CancellationTokenSource _workerCanceller;
|
||||
|
@ -39,8 +39,7 @@ namespace BirthdayBot.BackgroundServices
|
|||
{new StaleDataCleaner(instance)}
|
||||
};
|
||||
|
||||
_workerTask = Task.Factory.StartNew(WorkerLoop, _workerCanceller.Token,
|
||||
TaskCreationOptions.LongRunning, TaskScheduler.Default);
|
||||
_workerTask = Task.Factory.StartNew(WorkerLoop, _workerCanceller.Token);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
Loading…
Reference in a new issue