Skip to content

Commit 0cdbea3

Browse files
committed
chore: Only run one task at the same time against pgsql.. It's a HDD after all
1 parent 18881c3 commit 0cdbea3

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

CFLookup/Jobs/StoreCFApiFiles.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ ON CONFLICT (fileid, gameid, projectid) DO UPDATE
262262
}
263263
finally
264264
{
265-
BackgroundJob.Schedule(() => StoreCFApiFiles.RunAsync(null), TimeSpan.FromMinutes(30));
265+
BackgroundJob.Schedule(() => StoreCFApiFiles.RunAsync(null), TimeSpan.FromSeconds(10));
266266
}
267267
}
268268
}

CFLookup/Jobs/StoreCFApiProjects.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ ON CONFLICT (projectid, gameid) DO UPDATE
252252
}
253253
finally
254254
{
255-
BackgroundJob.Schedule(() => StoreCFApiProjects.RunAsync(null), TimeSpan.FromMinutes(30));
255+
BackgroundJob.Schedule(() => StoreCFApiFiles.RunAsync(null), TimeSpan.FromSeconds(10));
256256
}
257257
}
258258
}

CFLookup/Program.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,6 @@ private static async Task Main(string[] args)
191191
{
192192
BackgroundJob.Schedule(() => StoreCFApiProjects.RunAsync(null), TimeSpan.FromSeconds(10));
193193
}
194-
195-
if(!SharedMethods.CheckIfTaskIsScheduledOrInProgress("StoreCFApiFiles", "RunAsync"))
196-
{
197-
BackgroundJob.Schedule(() => StoreCFApiFiles.RunAsync(null), TimeSpan.FromSeconds(10));
198-
}
199194
#endif
200195

201196
await app.RunAsync();

0 commit comments

Comments
 (0)