Skip to content

Commit

Permalink
Merge pull request #4775 from VinceMacBuche/bug_22646/we_should_initi…
Browse files Browse the repository at this point in the history
…alize_campaign_service_after_plugin_were_added_or_else_current_events_will_be_skipped_before_being_added_again

Fixes #22646: We should initialize campaign service after plugin were added or else current events will be skipped (before being added again)
  • Loading branch information
VinceMacBuche committed Apr 24, 2023
2 parents 212ab46 + 5966ab5 commit 5b2eac2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ class Boot extends Loggable {
//// init plugin code (ie: bootstrap their objects / connections / etc ////
val plugins = initPlugins()

// Run post plugin init actions:
RudderConfig.postPluginInitActions

////////// CACHE INVALIDATION FOR RESOURCES //////////
// fails on invalid JSON body because it's unsufferable
LiftRules.statelessDispatch.append {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2933,10 +2933,11 @@ object RudderConfig extends Loggable {
val mainCampaignService = new MainCampaignService(campaignEventRepo, campaignRepo, uuidGen, 1, 1)
lazy val jsonReportsAnalyzer = JSONReportsAnalyser(reportsRepository, propertyRepository)

// todo: scheduler interval should be a property
ZioRuntime.unsafeRun(jsonReportsAnalyzer.start(5.seconds).forkDaemon.provideLayer(ZioRuntime.layers))

ZioRuntime.unsafeRun(MainCampaignService.start(mainCampaignService))
def postPluginInitActions = {
// todo: scheduler interval should be a property
ZioRuntime.unsafeRun(jsonReportsAnalyzer.start(5.seconds).forkDaemon.provideLayer(ZioRuntime.layers))
ZioRuntime.unsafeRun(MainCampaignService.start(mainCampaignService))
}

/**
* *************************************************
Expand Down

0 comments on commit 5b2eac2

Please sign in to comment.