Skip to content

Commit

Permalink
Fix parsing of minCreatedAt in fillClanActivePlayerCount
Browse files Browse the repository at this point in the history
  • Loading branch information
needs committed Jan 4, 2025
1 parent fe96190 commit 786ae3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apps/worker/src/workers/fillClanActivePlayerCount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const MIN_CREATED_AT_KEY = 'fill-clan-active-player-count-min-created-at';
async function processor() {
const redisClient = await redisClientPromise;

const storedMinCreatedAt = await redisClient.get(MIN_CREATED_AT_KEY);
const minCreatedAt = new Date(storedMinCreatedAt || 0);
const minCreatedAt = new Date(Number(await redisClient.get(MIN_CREATED_AT_KEY) || "0"));
console.log(`Min created at: ${minCreatedAt}`);

const clans = await prisma.clan.findMany({
Expand Down

0 comments on commit 786ae3b

Please sign in to comment.