diff --git a/src/lib/Task.ts b/src/lib/Task.ts index 2176848074..6515772122 100644 --- a/src/lib/Task.ts +++ b/src/lib/Task.ts @@ -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'; @@ -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({