BirthdayBot/BackgroundServices/BackgroundService.cs
Noi 2f0fe8641a Implement own sharding system
The BirthdayBot class has been split up into ShardInstance and
ShardManager. Several other things have been reorganized so that shards
may act independently.

The overall goal of these changes made is to limit failures to sections
that can easily be discarded and replaced.
2020-10-04 21:40:38 -07:00

16 lines
448 B
C#

using System.Threading;
using System.Threading.Tasks;
namespace BirthdayBot.BackgroundServices
{
abstract class BackgroundService
{
protected ShardInstance ShardInstance { get; }
public BackgroundService(ShardInstance instance) => ShardInstance = instance;
protected void Log(string message) => ShardInstance.Log(GetType().Name, message);
public abstract Task OnTick(CancellationToken token);
}
}