Esempio n. 1
0
 public RFIntervalComponent(RFComponentContext context, IRFEventSink eventManager)
     : base(context)
 {
     _eventManager   = eventManager;
     _intervalLength = context.SystemConfig.IntervalLength;
     if (_intervalLength == 0)
     {
         _intervalLength = 60000;
     }
     _downtime = context.SystemConfig.Downtime;
 }
Esempio n. 2
0
        /// <summary>
        /// Configures process to automatically run based on configuration
        /// </summary>
        /// <param name="taskName"></param>
        /// <param name="process"></param>
        /// <param name="isExclusive">If set the task won't run concurrently</param>
        /// <param name="isSystem"></param>
        /// <returns></returns>
        public RFEngineTaskDefinition AddScheduledTask(string taskName, RFEngineProcessDefinition process, bool isSystem = false)
        {
            var task = new RFSchedulerTaskDefinition
            {
                RangeFunc     = c => RFSchedulerRange.ReadFromConfig(RFSchedulerTaskDefinition.CONFIG_SECTION, taskName, c.UserConfig),
                SchedulesFunc = c => RFSchedulerSchedule.ReadFromConfig(RFSchedulerTaskDefinition.CONFIG_SECTION, taskName, c.UserConfig).Single(),
                TaskName      = taskName,
                TaskProcess   = process,
                IsSystem      = isSystem
            };

            Tasks.Add(task);
            task.AddToEngine(this);
            return(task);
        }
Esempio n. 3
0
 public RFInvertedRange(RFSchedulerRange range) : base(null)
 {
     Range = range;
 }
 /// <summary>
 /// Configures graph process to automatically trigger on specific schedule
 /// </summary>
 /// <returns></returns>
 public RFGraphTaskDefinition AddScheduledTask <D>(string taskName, List <RFSchedulerSchedule> schedules, RFSchedulerRange range, RFGraphProcessDefinition process, RFGraphInstance instance)
     where D : RFGraphProcessorDomain
 {
     return(AddScheduledTask <D>(taskName, () => schedules, () => range, process, instance));
 }
Esempio n. 5
0
 /// <summary>
 /// Configures process to automatically run on specific schedule
 /// </summary>
 /// <param name="taskName"></param>
 /// <param name="schedules"></param>
 /// <param name="range"></param>
 /// <param name="process"></param>
 /// <returns></returns>
 public RFEngineTaskDefinition AddScheduledTask(string taskName, List <RFSchedulerSchedule> schedules, RFSchedulerRange range, RFEngineProcessDefinition process, bool isSystem)
 {
     return(AddScheduledTask(taskName, () => schedules, () => range, process, isSystem));
 }