Skip to content

Commit

Permalink
rename to cronworker
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan committed Apr 10, 2024
1 parent dd006cb commit fb16c98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Cronos;
using Microsoft.Extensions.Logging;

public abstract class SchedulerWorker : Worker, IDisposable
public abstract class CronWorker : Worker, IDisposable
{
private readonly ILogger _logger;
private readonly Random _delayGenerator = new();
Expand All @@ -17,12 +17,12 @@ public abstract class SchedulerWorker : Worker, IDisposable
// Cron format: https://www.nuget.org/packages/Cronos/
protected abstract string CronSchedule { get; }

protected SchedulerWorker(ILogger logger) : base(logger)
protected CronWorker(ILogger logger) : base(logger)
{
_logger = logger;
}

protected SchedulerWorker(SchedulerOption option, ILogger logger) : base(logger)
protected CronWorker(SchedulerOption option, ILogger logger) : base(logger)
{
_option = option;
_logger = logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace ClickView.Extensions.Hosting.Tests;
using Moq;
using Workers;

public class SchedulerWorkerTests
public class CronWorkerTests
{
[Fact]
public async Task RunAsync_RunEveryTwoSeconds()
Expand Down Expand Up @@ -56,7 +56,7 @@ public async Task RunAsync_RunEveryTwoSeconds_return()
scheduler.Dispose();
}

public class TestScheduler : SchedulerWorker
public class TestScheduler : CronWorker
{
public int Counter { get; set; }

Expand All @@ -74,7 +74,7 @@ protected override Task RunAsync(CancellationToken cancellationToken)
protected override string CronSchedule { get; }
}

public class TestSchedulerWithOption : SchedulerWorker
public class TestSchedulerWithOption : CronWorker
{
public DateTime? FirstExecutionTime { get; set; }

Expand Down

0 comments on commit fb16c98

Please sign in to comment.