Switch to our fixed version of threads.js, cron: don't do cleanup on start (before the db is initialized)

This commit is contained in:
Alex Gleason 2023-12-06 21:16:53 -06:00
parent 9000d4fc0a
commit 80863874ae
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 3 additions and 6 deletions

View file

@ -1,5 +1,5 @@
import { Conf } from '@/config.ts';
// import '@/cron.ts';
import '@/cron.ts';
import { type User } from '@/db/users.ts';
import {
type Context,

View file

@ -38,8 +38,5 @@ async function cleanupMedia() {
console.log(`Removed ${media?.length ?? 0} orphaned media files.`);
}
await cleanupEvents();
await cleanupMedia();
cron.every15Minute(cleanupEvents);
cron.every15Minute(cleanupMedia);

View file

@ -79,7 +79,7 @@ export { Machina } from 'https://gitlab.com/soapbox-pub/nostr-machina/-/raw/08a1
export * as Sentry from 'https://deno.land/x/sentry@7.78.0/index.js';
export { sentry as sentryMiddleware } from 'npm:@hono/sentry@^1.0.0';
export * as Comlink from 'npm:comlink@^4.4.1';
export { Pool, spawn } from 'npm:threads@^1.7.0';
export { expose } from 'npm:threads@^1.7.0/worker';
export { Pool, spawn } from 'npm:@soapbox.pub/threads@^1.7.5';
export { expose } from 'npm:@soapbox.pub/threads@^1.7.5/worker';
export type * as TypeFest from 'npm:type-fest@^4.3.0';