Fix notification logic
* Fix notification logic
This bug was preventing the rest of the NewFils logic to proceed if no notification was associated with the container
* build fix
@@ -20,12 +20,8 @@ public class NotificationOperations : Orm<Notification>, INotificationOperations
public async Async.Task NewFiles(Container container, string filename, bool isLastRetryAttempt) {
var notifications = GetNotifications(container);
var hasNotifications = await notifications.AnyAsync();
-
- if (!hasNotifications) {
- return;
- }
-
var reportOrRegression = await _context.Reports.GetReportOrRegression(container, filename, expectReports: hasNotifications);
+ if (hasNotifications) {
var done = new List<NotificationTemplate>();
await foreach (var notification in notifications) {
if (done.Contains(notification.Config)) {
@@ -50,6 +46,7 @@ public class NotificationOperations : Orm<Notification>, INotificationOperations
await _context.GithubIssues.GithubIssue(githubIssuesTemplate, container, filename, reportOrRegression, notification.NotificationId);
}
}
+ }
await foreach (var (task, containers) in GetQueueTasks()) {
if (containers.Contains(container)) {
