public RedisTaskQueueBackend(string redisConnectionString, string queueName, string backupQueueName) { Redis = ConnectionMultiplexer.Connect(redisConnectionString); RedisQueue = new RedisQueue(Redis); QueueName = queueName; BackupQueueName = backupQueueName; }
public void RemoveBackup(string jsonString) { if (jsonString == null) { return; } RedisQueue.Remove(BackupQueueName, jsonString); }
public string RestoreTopBackup() { var jsonString = RedisQueue.PopPush(BackupQueueName, QueueName); return(jsonString); }
public string PeekBackup() { var jsonString = RedisQueue.Peek(BackupQueueName); return(jsonString); }
public string DequeueAndBackup() { var jsonString = RedisQueue.PopPush(QueueName, BackupQueueName); return(jsonString); }
public string Dequeue() { var jsonString = RedisQueue.Pop(QueueName); return(jsonString); }
public void Enqueue(string jsonString) { RedisQueue.Push(QueueName, jsonString); }
public async Task <string> Dequeue() { var jsonString = await RedisQueue.Pop(QueueName); return(jsonString); }
public async Task Enqueue(string jsonString) { await RedisQueue.Push(QueueName, jsonString); }
public RedisBackend(string redisConnectionString) { Redis = ConnectionMultiplexer.Connect(redisConnectionString); RedisQueue = new RedisQueue(Redis); }