Skip to content

Commit

Permalink
Fix test bot trips
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Sep 24, 2024
1 parent 4c1a4d8 commit 22fb504
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ import { guardiansOfTheRiftTask } from './../tasks/minions/minigames/guardiansOf
import { nightmareZoneTask } from './../tasks/minions/minigames/nightmareZoneActivity';
import { underwaterAgilityThievingTask } from './../tasks/minions/underwaterActivity';
import { modifyBusyCounter } from './busyCounterCache';
import { minionActivityCache } from './constants';
import { globalConfig, minionActivityCache } from './constants';
import { sql } from './postgres';
import { convertStoredActivityToFlatActivity } from './settings/prisma';
import { activitySync, minionActivityCacheDelete } from './settings/settings';
Expand Down Expand Up @@ -193,8 +193,9 @@ const tasks: MinionTask[] = [
];

export async function processPendingActivities() {
const activities: Activity[] =
await sql`SELECT * FROM activity WHERE completed = false AND finish_date < NOW() LIMIT 5;`;
const activities: Activity[] = globalConfig.isProduction
? await sql`SELECT * FROM activity WHERE completed = false AND finish_date < NOW() LIMIT 5;`
: await sql`SELECT * FROM activity WHERE completed = false;`;

if (activities.length > 0) {
await prisma.activity.updateMany({
Expand Down

0 comments on commit 22fb504

Please sign in to comment.