Skip to content

Commit

Permalink
Merge pull request #474 from classtranscribe/angrave-production-patch-1
Browse files Browse the repository at this point in the history
Update QueueAwakerTask.cs
  • Loading branch information
angrave authored Jan 29, 2024
2 parents fbb5bd3 + e73634e commit 2051f8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TaskEngine/Tasks/QueueAwakerTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ private async Task DownloadAllPlaylists()
{
_downloadPlaylistInfoTask.PurgeQueue();

var cutOffDate = DateTimeOffset.Now.AddDays(14);
playlists = await _context.Offerings.Where(o => o.Term.EndDate < cutOffDate).SelectMany(o => o.Playlists).OrderByDescending(p => p.CreatedAt).Select(p => p.Id).ToListAsync();
var cutOffDate = DateTimeOffset.Now.AddDays(-14);
playlists = await _context.Offerings.Where(o => o.Term.EndDate > cutOffDate).SelectMany(o => o.Playlists).OrderByDescending(p => p.CreatedAt).Select(p => p.Id).ToListAsync();
}
GetLogger().LogInformation($"DownloadAllPlaylists(); _downloadPlaylistInfoTask publishing {playlists.Count} tasks");
playlists.ForEach(p => _downloadPlaylistInfoTask.Publish(p));
Expand Down

0 comments on commit 2051f8c

Please sign in to comment.