mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:16:30 +00:00
small fixes, renames
This commit is contained in:
@@ -53,7 +53,7 @@ public class FailsafeAnnotationsProducer
|
||||
await Init(cancellationToken);
|
||||
while (!cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
var messages = await GetFromQueue(cancellationToken);
|
||||
var messages = await GetFromInnerQueue(cancellationToken);
|
||||
foreach (var messagesChunk in messages.Chunk(10)) //Sending by 10
|
||||
{
|
||||
var sent = false;
|
||||
@@ -91,7 +91,7 @@ public class FailsafeAnnotationsProducer
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<List<AnnotationCreatedMessage>> GetFromQueue(CancellationToken cancellationToken = default)
|
||||
private async Task<List<AnnotationCreatedMessage>> GetFromInnerQueue(CancellationToken cancellationToken = default)
|
||||
{
|
||||
return await _dbFactory.Run(async db =>
|
||||
{
|
||||
@@ -124,7 +124,7 @@ public class FailsafeAnnotationsProducer
|
||||
});
|
||||
}
|
||||
|
||||
public async Task SendToQueue(Annotation annotation, CancellationToken cancellationToken = default)
|
||||
public async Task SendToInnerQueue(Annotation annotation, CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _dbFactory.Run(async db =>
|
||||
await db.InsertAsync(new AnnotationName { Name = annotation.Name }, token: cancellationToken));
|
||||
|
||||
Reference in New Issue
Block a user