-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DisposableScheduler #624
DisposableScheduler #624
Conversation
src/Extensions/NetDaemon.Extensions.Scheduling.Tests/Scheduling/DisposableSchedulerTest.cs
Show resolved
Hide resolved
} | ||
|
||
/// <inheritdoc/> | ||
public static IDisposable RunIn(IScheduler scheduler, TimeSpan timespan, Action action) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not very usefull anymore, they are just different names for something that already exists
/// <param name="action">Action to run</param> | ||
public static IDisposable RunEvery(this IScheduler scheduler, TimeSpan timespan, Action action) | ||
{ | ||
return scheduler.SchedulePeriodic(timespan, action); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these are not very usefull anymore, they are just different names for things that already exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree we should just use the default. This is a new interface anyway. The important thing is the error handling safety.
Codecov Report
@@ Coverage Diff @@
## dev #624 +/- ##
==========================================
+ Coverage 80.08% 80.63% +0.54%
==========================================
Files 111 114 +3
Lines 2898 2969 +71
Branches 311 318 +7
==========================================
+ Hits 2321 2394 +73
+ Misses 450 442 -8
- Partials 127 133 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
src/Extensions/NetDaemon.Extensions.Scheduling/DependencyInjectionSetup.cs
Show resolved
Hide resolved
b5af3b7
to
b819f13
Compare
b819f13
to
2533f26
Compare
* Cron Scheduling * FIx warning
Proposed change
Support Cron scheduling as an Extension of the IScheduler interface and allow
injection of an System.Reactive.Concurrency.IScheduler that logs exceptions and cancels scheduled tasks when the app is stopped.
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: