protected PanteonWorker(ILogger workerLogger, IWorkerSettings workerSettings, IHistoryStorage historyStorage) { HistoryStorage = historyStorage; WorkerLogger = workerLogger; WorkerSettings = workerSettings; _schtick = new Schtick(); Multiplexer = ConnectionMultiplexer.Connect(WorkerSettings.RedisConnectionString); TaskWrapper = new RedisSchtickWrapper(() => Multiplexer.GetDatabase(WorkerSettings.DbNo)); }
internal ScheduledTask(Schtick schtick, string name, Schedule schedule, ScheduledTaskCallback callback, ScheduledTaskAsyncCallback asyncCallback) { _schtick = schtick; Name = name; Schedule = schedule; if ((callback == null) == (asyncCallback == null)) { throw new Exception("callback or asyncCallback must be specified, but not both."); } Callback = callback; AsyncCallback = asyncCallback; }
internal ScheduledTask(Schtick schtick, string name, Schedule schedule, ScheduledTaskCallback callback, ScheduledTaskAsyncCallback asyncCallback) { _schtick = schtick; Name = name; Schedule = schedule; if ((callback == null) == (asyncCallback == null)) throw new Exception("callback or asyncCallback must be specified, but not both."); Callback = callback; AsyncCallback = asyncCallback; }