Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 14e5051

Browse files
authored
Merge pull request #107 from topcoder-platform/multi-round-sync
Additional formality and logging
2 parents c74f864 + af80491 commit 14e5051

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/services/ProcessorService.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ async function recreatePhases (legacyId, v5Phases, createdBy) {
5858
if(phaseLegacyId==17){
5959
logger.info(`Creating phase dependencies for checkpoint phases`)
6060

61-
registrationPhaseId = await timelineService.getProjectPhaseId(legacyId, 1)
62-
checkpointSubmissionPhaseId = await timelineService.getProjectPhaseId(legacyId, 15)
63-
checkpointScreeningPhaseId = await timelineService.getProjectPhaseId(legacyId, 16)
64-
checkpointReviewPhaseId = await timelineService.getProjectPhaseId(legacyId, 17)
61+
const registrationPhaseId = await timelineService.getProjectPhaseId(legacyId, 1)
62+
const checkpointSubmissionPhaseId = await timelineService.getProjectPhaseId(legacyId, 15)
63+
const checkpointScreeningPhaseId = await timelineService.getProjectPhaseId(legacyId, 16)
64+
const checkpointReviewPhaseId = await timelineService.getProjectPhaseId(legacyId, 17)
6565

6666
await timelineService.insertPhaseDependency(registrationPhaseId, checkpointSubmissionPhaseId, 1, createdBy)
6767
await timelineService.insertPhaseDependency(checkpointSubmissionPhaseId, checkpointScreeningPhaseId, 0, createdBy)

src/services/timelineService.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ async function getProjectPhaseId(challengeLegacyId, phaseTypeId) {
101101
} finally {
102102
await connection.closeAsync()
103103
}
104-
return _.get(result, '[0].project_phase_id', null)
104+
const project_phase_id = _.get(result, '[0].project_phase_id', null)
105+
logger.info(`Project phase ID: ${project_phase_id}`)
106+
return project_phase_id
105107
}
106108
/**
107109
* Drop challenge phase

0 commit comments

Comments
 (0)