Skip to content

Commit

Permalink
Fixed issue with web backgrounder and perf events
Browse files Browse the repository at this point in the history
(PagerDuty Incident NuGet#105)
  • Loading branch information
analogrelay committed Jun 10, 2014
1 parent e4e3428 commit 90c210d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/NuGetGallery/Diagnostics/ProcessPerfEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public ProcessPerfEvents(TimeSpan interval, string logDirectory, IEnumerable<str

public override Task Execute()
{
return Task.WhenAll(Queues.Select(q => ProcessQueue(q)));
return new Task(() => Task.WaitAll(Queues.Select(q => ProcessQueue(q)).ToArray()));
}

private async Task ProcessQueue(string queue)
Expand Down
5 changes: 4 additions & 1 deletion src/NuGetGallery/Infrastructure/Jobs/NuGetJobCoordinator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ private static Task CreateWrappingContinuingTask(Task originalTask, Action<Task>

var wrapper = new Task(() =>
{
originalTask.Start();
if (originalTask.Status == TaskStatus.WaitingForActivation)
{
originalTask.Start();
}
continuation.Wait();
});

Expand Down

0 comments on commit 90c210d

Please sign in to comment.