@ -62,7 +62,7 @@ namespace PlexRequests.UI.Jobs
var jobList = new List < IJobDetail >
var jobList = new List < IJobDetail >
{
{
JobBuilder . Create < PlexAvailabilityChecker > ( ) . WithIdentity ( "PlexAvailabilityChecker" , "Plex" ) . Build ( ) ,
JobBuilder . Create < PlexAvailabilityChecker > ( ) . WithIdentity ( "PlexAvailabilityChecker" , "Plex" ) . Build ( ) ,
JobBuilder . Create < PlexContentCacher > ( ) . WithIdentity ( "PlexContentCacher" , "Plex ") . Build ( ) ,
JobBuilder . Create < PlexContentCacher > ( ) . WithIdentity ( "PlexContentCacher" , "Plex Cacher ") . Build ( ) ,
JobBuilder . Create < PlexEpisodeCacher > ( ) . WithIdentity ( "PlexEpisodeCacher" , "Plex" ) . Build ( ) ,
JobBuilder . Create < PlexEpisodeCacher > ( ) . WithIdentity ( "PlexEpisodeCacher" , "Plex" ) . Build ( ) ,
JobBuilder . Create < PlexUserChecker > ( ) . WithIdentity ( "PlexUserChecker" , "Plex" ) . Build ( ) ,
JobBuilder . Create < PlexUserChecker > ( ) . WithIdentity ( "PlexUserChecker" , "Plex" ) . Build ( ) ,
JobBuilder . Create < SickRageCacher > ( ) . WithIdentity ( "SickRageCacher" , "Cache" ) . Build ( ) ,
JobBuilder . Create < SickRageCacher > ( ) . WithIdentity ( "SickRageCacher" , "Cache" ) . Build ( ) ,
@ -93,8 +93,8 @@ namespace PlexRequests.UI.Jobs
var jobs = CreateJobs ( ) ;
var jobs = CreateJobs ( ) ;
var triggers = CreateTriggers ( ) ;
var triggers = CreateTriggers ( ) ;
var jobDetails = jobs as IJobDetail [ ] ? ? jobs . ToArray( ) ;
var jobDetails = jobs as IJobDetail [ ] ? ? jobs . OrderByDescending( x = > x . Key . Name ) . ToArray( ) ;
var triggerDetails = triggers as ITrigger [ ] ? ? triggers . ToArray( ) ;
var triggerDetails = triggers as ITrigger [ ] ? ? triggers . OrderByDescending( x = > x . Key . Name ) . ToArray( ) ;
if ( jobDetails . Length ! = triggerDetails . Length )
if ( jobDetails . Length ! = triggerDetails . Length )
{
{
@ -175,7 +175,7 @@ namespace PlexRequests.UI.Jobs
. Build ( ) ;
. Build ( ) ;
var plexCacher =
var plexCacher =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "PlexContentCacher" , "Plex ")
. WithIdentity ( "PlexContentCacher" , "Plex Cacher ")
. StartNow ( )
. StartNow ( )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . PlexContentCacher ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . PlexContentCacher ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
@ -183,49 +183,49 @@ namespace PlexRequests.UI.Jobs
var plexUserChecker =
var plexUserChecker =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "PlexUserChecker" , "Plex" )
. WithIdentity ( "PlexUserChecker" , "Plex" )
. Start Now( )
. Start At( DateBuilder . FutureDate ( 30 , IntervalUnit . Minute ) )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . PlexUserChecker ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . PlexUserChecker ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
var srCacher =
var srCacher =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "SickRageCacher" , "Cache" )
. WithIdentity ( "SickRageCacher" , "Cache" )
. Start Now( )
. Start At( DateBuilder . FutureDate ( 2 , IntervalUnit . Minute ) )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . SickRageCacher ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . SickRageCacher ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
var sonarrCacher =
var sonarrCacher =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "SonarrCacher" , "Cache" )
. WithIdentity ( "SonarrCacher" , "Cache" )
. Start Now( )
. Start At( DateBuilder . FutureDate ( 3 , IntervalUnit . Minute ) )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . SonarrCacher ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . SonarrCacher ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
var cpCacher =
var cpCacher =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "CouchPotatoCacher" , "Cache" )
. WithIdentity ( "CouchPotatoCacher" , "Cache" )
. Start Now( )
. Start At( DateBuilder . FutureDate ( 4 , IntervalUnit . Minute ) )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . CouchPotatoCacher ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInMinutes ( s . CouchPotatoCacher ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
var storeBackup =
var storeBackup =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "StoreBackup" , "Database" )
. WithIdentity ( "StoreBackup" , "Database" )
. Start Now( )
. Start At( DateBuilder . FutureDate ( 20 , IntervalUnit . Minute ) )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . StoreBackup ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . StoreBackup ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
var storeCleanup =
var storeCleanup =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "StoreCleanup" , "Database" )
. WithIdentity ( "StoreCleanup" , "Database" )
. Start Now( )
. Start At( DateBuilder . FutureDate ( 35 , IntervalUnit . Minute ) )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . StoreCleanup ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . StoreCleanup ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
var userRequestLimiter =
var userRequestLimiter =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "UserRequestLimiter" , "Request" )
. WithIdentity ( "UserRequestLimiter" , "Request" )
. StartAt ( DateBuilder . FutureDate ( 5, IntervalUnit . Minute ) )
. StartAt ( DateBuilder . FutureDate ( 2 5, IntervalUnit . Minute ) )
// Everything has started on application start, lets wait 5 minutes
// Everything has started on application start, lets wait 5 minutes
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . UserRequestLimitResetter ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . UserRequestLimitResetter ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
@ -233,7 +233,7 @@ namespace PlexRequests.UI.Jobs
var plexEpCacher =
var plexEpCacher =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "PlexEpisodeCacher" , "Cache" )
. WithIdentity ( "PlexEpisodeCacher" , "Cache" )
. StartAt ( DateBuilder . FutureDate ( 5 , IntervalUnit . Minute ) )
. StartAt ( DateBuilder . FutureDate ( 10 , IntervalUnit . Minute ) )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . PlexEpisodeCacher ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . PlexEpisodeCacher ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
@ -243,14 +243,13 @@ namespace PlexRequests.UI.Jobs
. WithIdentity ( "RecentlyAddedModel" , "Email" )
. WithIdentity ( "RecentlyAddedModel" , "Email" )
. StartNow ( )
. StartNow ( )
. WithCronSchedule ( s . RecentlyAddedCron )
. WithCronSchedule ( s . RecentlyAddedCron )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( 2 ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;
var fault =
var fault =
TriggerBuilder . Create ( )
TriggerBuilder . Create ( )
. WithIdentity ( "FaultQueueHandler" , "Fault" )
. WithIdentity ( "FaultQueueHandler" , "Fault" )
//.StartAt(DateBuilder.FutureDate(10, IntervalUnit.Minute))
//.StartAt(DateBuilder.FutureDate(10, IntervalUnit.Minute))
. Start Now( )
. Start At( DateBuilder . FutureDate ( 13 , IntervalUnit . Minute ) )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . FaultQueueHandler ) . RepeatForever ( ) )
. WithSimpleSchedule ( x = > x . WithIntervalInHours ( s . FaultQueueHandler ) . RepeatForever ( ) )
. Build ( ) ;
. Build ( ) ;