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

June 16 deploy #69

Merged
merged 10 commits into from
Jun 16, 2021
Prev Previous commit
Next Next commit
Can't Close a Draft Challenge
James Cori committed Feb 19, 2021
commit 891598a41acece39ac92a039097aa2daa185b90d
8 changes: 4 additions & 4 deletions services/IssueService.js
Original file line number Diff line number Diff line change
@@ -526,13 +526,13 @@ async function handleIssueClose(event, issue) { // eslint-disable-line
}

// activate challenge
// if (challenge.status === 'Draft') {
// await topcoderApiHelper.activateChallenge(dbIssue.challengeUUID);

if (challenge.status === 'Draft') {
await topcoderApiHelper.activateChallenge(dbIssue.challengeUUID);
//HACK - sleep 30 seconds so the legacy processor has time to "catch up"
// logger.debugWithContext('Sleeping for 1 seconds after activation so everything propagates...', event, issue);
// await new Promise(resolve => setTimeout(resolve, 1000));
// }
}

logger.debugWithContext(`Closing challenge with winner ${assigneeMember.topcoderUsername}(${winnerId})`, event, issue);
await topcoderApiHelper.closeChallenge(dbIssue.challengeUUID, winnerId, assigneeMember.topcoderUsername);