Skip to content

Commit a769b13

Browse files
committed
Update AgentEventsManager.cs
1 parent fc503d5 commit a769b13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

MyApp.ServiceInterface/AgentEventsManager.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,10 @@ public PendingArtifactResults GetPendingArtifactTasks(IDbConnection db, string u
484484

485485
if (nextArtifacts.Count == 0)
486486
return new ([], [], [], [], []);
487+
488+
using var dbJobs = jobs.OpenDb();
487489

488-
var backgroundJobs = db.Select(db.From<BackgroundJob>()
490+
var backgroundJobs = dbJobs.Select(dbJobs.From<BackgroundJob>()
489491
.Where(x => x.Callback == nameof(CaptionArtifactCommand) || x.Callback == nameof(DescribeArtifactCommand)));
490492

491493
var existingCaptionArtifactIds = backgroundJobs.Where(x => x.Callback == nameof(CaptionArtifactCommand))

0 commit comments

Comments
 (0)