|
|
@@ -865,17 +865,23 @@ public class AppConfiguration {
|
|
|
if (tidbDataSource == null) return null;
|
|
|
String mainSchema = resolveDatabaseName(tidbDataSource, props.getTidbUrl());
|
|
|
if (mainSchema == null || mainSchema.isBlank()) return null;
|
|
|
- AdBidReportStore store = new AdBidReportStore(
|
|
|
- tidbDataSource,
|
|
|
- mainSchema,
|
|
|
- props.getReportDatabaseName(),
|
|
|
- props.getAdBidReportRetentionDays(),
|
|
|
- props.getTrackingReportRetentionDays(),
|
|
|
- props.getAdBidReportArchiveBatchSize(),
|
|
|
- props.getAdBidReportArchiveMaxBatchesPerRun(),
|
|
|
- props.getAdBidReportStatsLookbackDays());
|
|
|
- store.migrate();
|
|
|
- return store;
|
|
|
+ try {
|
|
|
+ AdBidReportStore store = new AdBidReportStore(
|
|
|
+ tidbDataSource,
|
|
|
+ mainSchema,
|
|
|
+ props.getReportDatabaseName(),
|
|
|
+ props.getAdBidReportRetentionDays(),
|
|
|
+ props.getTrackingReportRetentionDays(),
|
|
|
+ props.getAdBidReportArchiveBatchSize(),
|
|
|
+ props.getAdBidReportArchiveMaxBatchesPerRun(),
|
|
|
+ props.getAdBidReportStatsLookbackDays());
|
|
|
+ store.migrate();
|
|
|
+ log.info("Ad bid report store initialized and migrated");
|
|
|
+ return store;
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("Failed to open ad bid report store: {}; ad bid report tasks disabled", e.getMessage(), e);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// ─── ColdWorker ─────────────────────────────────────────────────────────
|