Bundle from worker to grain
This commit is contained in:
@@ -277,7 +277,7 @@ public class BundleBacktestWorker : BaseWorker<BundleBacktestWorker>
|
||||
bundleRequest.User, // No user context in worker
|
||||
true,
|
||||
runBacktestRequest.WithCandles,
|
||||
bundleRequest.RequestId // Use bundleRequestId as requestId for traceability
|
||||
bundleRequest.RequestId.ToString() // Use bundleRequestId as requestId for traceability
|
||||
);
|
||||
|
||||
_logger.LogInformation("Processed backtest for bundle request {RequestId}", bundleRequest.RequestId);
|
||||
|
||||
@@ -13,7 +13,7 @@ public class NotifyBundleBacktestWorker : BaseWorker<NotifyBundleBacktestWorker>
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly IHubContext<BacktestHub> _hubContext;
|
||||
private readonly ConcurrentDictionary<string, HashSet<string>> _sentBacktestIds = new();
|
||||
private readonly ConcurrentDictionary<Guid, HashSet<string>> _sentBacktestIds = new();
|
||||
|
||||
public NotifyBundleBacktestWorker(
|
||||
IServiceProvider serviceProvider,
|
||||
@@ -39,7 +39,6 @@ public class NotifyBundleBacktestWorker : BaseWorker<NotifyBundleBacktestWorker>
|
||||
foreach (var bundle in runningBundles)
|
||||
{
|
||||
var requestId = bundle.RequestId;
|
||||
if (string.IsNullOrEmpty(requestId)) continue;
|
||||
|
||||
// Fetch all backtests for this bundle
|
||||
var (backtests, _) = backtester.GetBacktestsByRequestIdPaginated(requestId, 1, 100);
|
||||
|
||||
Reference in New Issue
Block a user