public bool UpdateAppointmentCancellationFlag(CancelAppointmentFlagViewModel pub) { IDatabase db = RedisConnection.ConnectionMultiplexer.GetDatabase(_settings.RedisDatabaseKey); ISubscriber sub = RedisConnection.ConnectionMultiplexer.GetSubscriber(); var serialisedObject = Newtonsoft.Json.JsonConvert.SerializeObject(pub); db.ListLeftPush(RequestSubcriberChannelNames.CallQueueCustomerUpdateCancellationFlagQueue, serialisedObject); try { sub.Publish(RequestSubcriberChannelNames.CallQueueCustomerUpdateCancellationFlagChannel, ""); } catch (Exception ex) { var length = db.ListLength(RequestSubcriberChannelNames.CallQueueCustomerUpdateCancellationFlagQueue); if (length > 0) { _logger.Error("Queue name:" + RequestSubcriberChannelNames.CallQueueCustomerUpdateCancellationFlagQueue + " and Length:" + length); db.ListLeftPop(RequestSubcriberChannelNames.CallQueueCustomerUpdateCancellationFlagQueue); } _logger.Error("Exception occurred while publishing Appointment Cancellation Detail. Message: " + ex.Message); _logger.Error("Stack Trace: " + ex.StackTrace); } return(true); }
private void UpdateCancellationFlag(CancelAppointmentFlagViewModel customer) { _callQueueCustomerRepository.UpdateCancelAppointment(customer); }