Skip to content

Commit

Permalink
Do not fetch the repository from the database if it has been deleted (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell authored Nov 24, 2023
1 parent 7cba9fc commit e17e558
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public async Task ConsumeAsync(EventContext<RepositoryDeletedEvent> context, Can

// remove from scheduler
var repositoryId = evt.RepositoryId ?? throw new InvalidOperationException($"'{nameof(evt.RepositoryId)}' cannot be null");
var repository = await dbContext.Repositories.SingleAsync(r => r.Id == repositoryId, cancellationToken);
await scheduler.RemoveAsync(repositoryId, cancellationToken);
}
}

0 comments on commit e17e558

Please sign in to comment.