Update threading model for company profile

This commit is contained in:
2025-04-05 12:48:45 -04:00
parent 5b971c8a74
commit f21543bcba
8 changed files with 106 additions and 482 deletions

View File

@@ -33,6 +33,7 @@ namespace MarketData.Services
tasks.Add("UPDATELATESTANALYSTRATINGS",TaskUpdateLatestAnalystRatings);
tasks.Add("UPDATEANALYSTRATINGS",TaskUpdateAnalystRatings);
tasks.Add("UPDATESECFILINGSWATCHLIST",TaskUpdateSECFilingsWatchList);
tasks.Add("UPDATECOMPANYPROFILES",TaskUpdateCompanyProfiles);
tasks.Add("ECHO",TaskEcho);
GlobalConfig.Instance.Configuration = configuration; // This call sets up configuration stuff so it needs to be first.
@@ -85,8 +86,15 @@ namespace MarketData.Services
MDTrace.WriteLine(LogLevel.DEBUG,$"[RunService] Done, total took {profiler.End()}(ms)");
}
// **********************************************************************************************************************************************************
// ********************************************************* T A S K S *************************************************************************************
// **********************************************************************************************************************************************************
public async Task TaskUpdateCompanyProfiles(CommandArgs commandArgs)
{
UpdateCompanyProfiles();
await Task.FromResult(true);
}
// *********************************************************************************************************************************************************************************
public async Task TaskUpdateSECFilingsWatchList(CommandArgs commandArgs)
{
if(!commandArgs.Has("WATCHLIST")){Console.WriteLine("UPDATESECFILINGSWATCHLIST REQUIRES WATCHLIST");return;}
@@ -157,6 +165,10 @@ namespace MarketData.Services
await Task.FromResult(true);
}
// *********************************************************************************************************************************************************
// *********************************************************************************************************************************************************
// *********************************************************************************************************************************************************
private static bool CreateLogging(String task)
{
if(String.IsNullOrEmpty(task))return false;
@@ -192,6 +204,7 @@ namespace MarketData.Services
MDTrace.WriteLine(LogLevel.DEBUG,"UPDATELATESTPRICEWATCHLIST /WATCHLIST:");
MDTrace.WriteLine(LogLevel.DEBUG,"UPDATELATESTPRICEOPENPOSITIONS");
MDTrace.WriteLine(LogLevel.DEBUG,"UPDATESECFILINGSWATCHLIST /WATCHLIST:");
MDTrace.WriteLine(LogLevel.DEBUG,"UPDATECOMPANYPROFILES");
}
// **********************************************************************************************************************************************