🐛 Fix wrong queue name
This commit is contained in:
		@@ -16,8 +16,8 @@ public class QueueBackgroundService(
 | 
			
		||||
)
 | 
			
		||||
    : BackgroundService
 | 
			
		||||
{
 | 
			
		||||
    private const string QueueName = "pusher.queue";
 | 
			
		||||
    private const string QueueGroup = "pusher.workers";
 | 
			
		||||
    public const string QueueName = "pusher.queue";
 | 
			
		||||
    public const string QueueGroup = "pusher.workers";
 | 
			
		||||
    private readonly int _consumerCount = configuration.GetValue<int?>("ConsumerCount") ?? Environment.ProcessorCount;
 | 
			
		||||
    private readonly List<Task> _consumerTasks = [];
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,8 +6,6 @@ namespace DysonNetwork.Pusher.Services;
 | 
			
		||||
 | 
			
		||||
public class QueueService(INatsConnection nats)
 | 
			
		||||
{
 | 
			
		||||
    private const string QueueName = "pusher_queue";
 | 
			
		||||
 | 
			
		||||
    public async Task EnqueueEmail(string toName, string toAddress, string subject, string body)
 | 
			
		||||
    {
 | 
			
		||||
        var message = new QueueMessage
 | 
			
		||||
@@ -22,7 +20,7 @@ public class QueueService(INatsConnection nats)
 | 
			
		||||
            })
 | 
			
		||||
        };
 | 
			
		||||
        var rawMessage = GrpcTypeHelper.ConvertObjectToByteString(message).ToByteArray();
 | 
			
		||||
        await nats.PublishAsync(QueueName, rawMessage);
 | 
			
		||||
        await nats.PublishAsync(QueueBackgroundService.QueueName, rawMessage);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public async Task EnqueuePushNotification(Notification.Notification notification, Guid userId, bool isSavable = false)
 | 
			
		||||
@@ -37,7 +35,7 @@ public class QueueService(INatsConnection nats)
 | 
			
		||||
            Data = JsonSerializer.Serialize(notification)
 | 
			
		||||
        };
 | 
			
		||||
        var rawMessage = GrpcTypeHelper.ConvertObjectToByteString(message).ToByteArray();
 | 
			
		||||
        await nats.PublishAsync(QueueName, rawMessage);
 | 
			
		||||
        await nats.PublishAsync(QueueBackgroundService.QueueName, rawMessage);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user