Skip to content

Commit

Permalink
RavenDB-21956 Small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
djordjedjukic committed May 8, 2024
1 parent 8fcd38c commit b2246d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ private void LoadToFunction(string queueName, ScriptRunnerResult document, Cloud

var result = document.TranslateToObject(Context);

var topic = GetOrAdd(queueName);
var queue = GetOrAdd(queueName);

topic.Items.Add(new AzureQueueStorageItem(Current) { TransformationResult = result, Attributes = attributes });
queue.Items.Add(new AzureQueueStorageItem(Current) { TransformationResult = result, Attributes = attributes });
}

public override void Initialize(bool debugMode)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using Azure.Storage.Queues;
Expand Down Expand Up @@ -102,6 +103,7 @@ private string CreateBase64CloudEvent(AzureQueueStorageItem queueItem)
protected override void OnProcessStopped()
{
_queueClients.Clear();
_alreadyCreatedQueues.Clear();
}

private void CreateQueueIfNotExists(QueueClient queueClient)
Expand Down

0 comments on commit b2246d1

Please sign in to comment.