mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
back to tiny for now
This commit is contained in:
parent
2912561d0e
commit
4deecde092
84 changed files with 617 additions and 558 deletions
|
@ -10,6 +10,7 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
IList<ScheduledTask> GetPendingJobs();
|
||||
ScheduledTask GetDefinition(Type type);
|
||||
void SetLastExecutionTime(int id, DateTime executionTime);
|
||||
}
|
||||
|
||||
|
||||
|
@ -23,7 +24,7 @@ namespace NzbDrone.Core.Jobs
|
|||
|
||||
public ScheduledTask GetDefinition(Type type)
|
||||
{
|
||||
return Query.Single(c => c.Name == type.FullName);
|
||||
return Query.Single(c => c.TypeName == type.FullName);
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,5 +32,16 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
return Query.Where(c => c.Interval != 0).ToList().Where(c => c.LastExecution < DateTime.Now.AddMinutes(-c.Interval)).ToList();
|
||||
}
|
||||
|
||||
public void SetLastExecutionTime(int id, DateTime executionTime)
|
||||
{
|
||||
var task = new ScheduledTask
|
||||
{
|
||||
Id = id,
|
||||
LastExecution = executionTime
|
||||
};
|
||||
|
||||
SetFields(task, scheduledTask => scheduledTask.LastExecution);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue