@@ -30,6 +30,8 @@ import { config } from '../../config.js';
30
30
import * as eventBusBuilder from '../../infrastructure/events/EventBusBuilder.js' ;
31
31
import { EventDispatcher } from '../../infrastructure/events/EventDispatcher.js' ;
32
32
import { EventDispatcherLogger } from '../../infrastructure/events/EventDispatcherLogger.js' ;
33
+ import * as disabledPoleEmploiNotifier from '../../infrastructure/externals/pole-emploi/disabled-pole-emploi-notifier.js' ;
34
+ import * as poleEmploiNotifier from '../../infrastructure/externals/pole-emploi/pole-emploi-notifier.js' ;
33
35
import { monitoringTools as MonitoringTools } from '../../infrastructure/monitoring-tools.js' ;
34
36
import * as badgeAcquisitionRepository from '../../infrastructure/repositories/badge-acquisition-repository.js' ;
35
37
import * as campaignParticipationRepository from '../../infrastructure/repositories/campaign-participation-repository.js' ;
@@ -41,16 +43,27 @@ import * as complementaryCertificationScoringCriteriaRepository from '../../infr
41
43
import * as juryCertificationSummaryRepository from '../../infrastructure/repositories/jury-certification-summary-repository.js' ;
42
44
import * as knowledgeElementRepository from '../../infrastructure/repositories/knowledge-element-repository.js' ;
43
45
import { participantResultsSharedRepository } from '../../infrastructure/repositories/participant-results-shared-repository.js' ;
46
+ import * as poleEmploiSendingRepository from '../../infrastructure/repositories/pole-emploi-sending-repository.js' ;
44
47
import * as targetProfileRepository from '../../infrastructure/repositories/target-profile-repository.js' ;
45
48
import * as scoringCertificationService from '../services/scoring/scoring-certification-service.js' ;
46
49
import { handleAutoJury } from './handle-auto-jury.js' ;
47
50
import { handleCertificationRescoring } from './handle-certification-rescoring.js' ;
48
51
import { handleCertificationScoring } from './handle-certification-scoring.js' ;
49
52
import { handleComplementaryCertificationsScoring } from './handle-complementary-certifications-scoring.js' ;
53
+ import { handlePoleEmploiParticipationFinished } from './handle-pole-emploi-participation-finished.js' ;
54
+ import { handlePoleEmploiParticipationStarted } from './handle-pole-emploi-participation-started.js' ;
50
55
import { handleSessionFinalized } from './handle-session-finalized.js' ;
51
56
52
57
const { performance } = perf_hooks ;
53
58
59
+ function requirePoleEmploiNotifier ( ) {
60
+ if ( config . poleEmploi . pushEnabled ) {
61
+ return poleEmploiNotifier ;
62
+ } else {
63
+ return disabledPoleEmploiNotifier ;
64
+ }
65
+ }
66
+
54
67
const dependencies = {
55
68
answerRepository,
56
69
assessmentRepository,
@@ -80,6 +93,8 @@ const dependencies = {
80
93
logger,
81
94
organizationRepository,
82
95
participantResultsSharedRepository,
96
+ poleEmploiNotifier : requirePoleEmploiNotifier ( ) ,
97
+ poleEmploiSendingRepository,
83
98
scoringCertificationService,
84
99
scoringDegradationService,
85
100
skillRepository,
@@ -94,6 +109,8 @@ const handlersToBeInjected = {
94
109
handleCertificationScoring,
95
110
handleCertificationRescoring,
96
111
handleComplementaryCertificationsScoring,
112
+ handlePoleEmploiParticipationFinished,
113
+ handlePoleEmploiParticipationStarted,
97
114
handleSessionFinalized,
98
115
} ;
99
116
0 commit comments