public RedisConnection(IDatabase redis, RedisStorageInternals StorageInternals) { Redis = redis; Sub = StorageInternals.Sub; LockID = StorageInternals.StorageLockID; Prefix = StorageInternals.Prefix; }
public RedisStorage(ConfigurationOptions Options, int db, string prefix) { if (Options == null) { throw new ArgumentNullException("Options"); } var HangfireOptions = new RedisStorageOptions() { Prefix = prefix }; Db = db; Options.AbortOnConnectFail = false; Options.ClientName = ClientName; ServerPool = ConnectionMultiplexer.Connect(Options); var Sub = new RedisSubscribe(ServerPool.GetSubscriber(), prefix); var LockID = Guid.NewGuid().ToString(); StorageInternals = new RedisStorageInternals(prefix, LockID, Sub); FetchedJobsOptions = new FetchedJobsWatcherOptions(HangfireOptions); }
public RedisStorage(ConfigurationOptions Options, int db, string prefix) { if (Options == null) throw new ArgumentNullException("Options"); var HangfireOptions = new RedisStorageOptions() { Prefix = prefix }; Db = db; Options.AbortOnConnectFail = false; Options.ClientName = ClientName; ServerPool = ConnectionMultiplexer.Connect(Options); var Sub = new RedisSubscribe(ServerPool.GetSubscriber(), prefix); var LockID = Guid.NewGuid().ToString(); StorageInternals = new RedisStorageInternals(prefix, LockID, Sub); FetchedJobsOptions = new FetchedJobsWatcherOptions(HangfireOptions); }
public RedisStorage(ConfigurationOptions RedisOptions, RedisStorageOptions HangfireOptions) { if (RedisOptions == null) { throw new ArgumentNullException("RedisOptions"); } if (HangfireOptions == null) { throw new ArgumentNullException("HangfireOptions"); } Db = HangfireOptions.Db; RedisOptions.AbortOnConnectFail = false; RedisOptions.ClientName = ClientName; ServerPool = ConnectionMultiplexer.Connect(RedisOptions); var Sub = new RedisSubscribe(ServerPool.GetSubscriber(), HangfireOptions.Prefix); var LockID = Guid.NewGuid().ToString(); StorageInternals = new RedisStorageInternals(HangfireOptions.Prefix, LockID, Sub); FetchedJobsOptions = new FetchedJobsWatcherOptions(HangfireOptions); }
public RedisStorage(ConfigurationOptions RedisOptions, RedisStorageOptions HangfireOptions) { if (RedisOptions == null) throw new ArgumentNullException("RedisOptions"); if (HangfireOptions == null) throw new ArgumentNullException("HangfireOptions"); Db = HangfireOptions.Db; RedisOptions.AbortOnConnectFail = false; RedisOptions.ClientName = ClientName; ServerPool = ConnectionMultiplexer.Connect(RedisOptions); var Sub = new RedisSubscribe(ServerPool.GetSubscriber(), HangfireOptions.Prefix); var LockID = Guid.NewGuid().ToString(); StorageInternals = new RedisStorageInternals(HangfireOptions.Prefix, LockID, Sub); FetchedJobsOptions = new FetchedJobsWatcherOptions(HangfireOptions); }