Skip to content

Commit

Permalink
feat: only include proposals whose funding round is currently in cosi…
Browse files Browse the repository at this point in the history
…deration dates
  • Loading branch information
iluxonchik committed Dec 19, 2024
1 parent 04ecf9e commit 8005368
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 8005368

Please sign in to comment.