Skip to content

Commit

Permalink
Merge pull request #90 from MinaFoundation/feature/ocv-vote-async-wor…
Browse files Browse the repository at this point in the history
…ker-adjust-filter

feat: only include proposals whose funding round is currently in cosi…
  • Loading branch information
iluxonchik authored Dec 19, 2024
2 parents 6ea1e0d + 8005368 commit 11dc467
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/scripts/bree-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const bree = new Bree({
errorHandler: (error, workerMetadata) => {
logger.error(`[Bree Runner] Worker ${workerMetadata.name} encountered an error:`, error);
},
workerMessageHandler: (name, message) => {
logger.error(`[Bree Runner] Message from worker ${name}`);
workerMessageHandler: (message, workerMetadata) => {
// empty intentionally
}
});

Expand Down
8 changes: 7 additions & 1 deletion src/tasks/ocv-vote-counting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,17 @@ async function processProposals() {
PROCESS_PROPOSALS_HEARTBEAT_INTERVAL
);

// Get active proposals
// Get set of active proposals. An active proposal is one whose funding round currently in consideratoin dates, and the proposal's status is either CONSIDERATION or DELIBERATION
const activeProposals = await prisma.proposal.findMany({
where: {
status: {
in: [ProposalStatus.CONSIDERATION, ProposalStatus.DELIBERATION]
},
fundingRound: {
considerationPhase: {
startDate: { lte: new Date() },
endDate: { gte: new Date() }
}
}
},
include: {
Expand Down

0 comments on commit 11dc467

Please sign in to comment.