Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions DataProcessing/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ public static void Main()
$"{VendorName} {QuiverCNBCDataDownloader.VendorDataName} data for date: {date:yyyy-MM-dd}");
}
}
instance.Flush();
if (!instance.Flush())
{
return false;
}
instance.ProcessUniverse();
return true;
});
Expand Down Expand Up @@ -138,7 +141,10 @@ public static void Main()
$"{VendorName} {QuiverInsiderTradingDataDownloader.VendorDataName} data for date: {date:yyyy-MM-dd}");
}
}
instance.Flush();
if (!instance.Flush())
{
return false;
}
instance.ProcessUniverse();
return true;
});
Expand Down
6 changes: 6 additions & 0 deletions DataProcessing/QuiverCNBCDataDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ public bool Run(DateTime processDate)
/// <returns>True on success</returns>
public bool Flush()
{
if (_cnbcByTicker.Count == 0)
{
Log.Error($"QuiverCNBCDataDownloader.Flush(): No data accumulated; treating run as a failure (likely unable to reach QuiverQuant).");
return false;
}

try
{
foreach (var kvp in _cnbcByTicker)
Expand Down
6 changes: 6 additions & 0 deletions DataProcessing/QuiverInsiderTradingDataDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ public bool Run(DateTime processDate)
/// <returns>True on success</returns>
public bool Flush()
{
if (_insiderTradingByTicker.Count == 0)
{
Log.Error($"QuiverInsiderTradingDataDownloader.Flush(): No data accumulated; treating run as a failure (likely unable to reach QuiverQuant).");
return false;
}

var failed = 0;
foreach (var kvp in _insiderTradingByTicker)
{
Expand Down
Loading