Skip to content

Commit

Permalink
Don't use swc bootstrap for production
Browse files Browse the repository at this point in the history
  • Loading branch information
Brainicism committed Oct 21, 2024
1 parent 44c66aa commit 908f86b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/helpers/kmq_song_downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default class KmqSongDownloader {
logger.info("Downloading via onesie URLs");
} else {
logger.info("Downloading via yt-dlp");
await this.reloadYoutubeSessionTokens();
}

const db = getNewConnection();
Expand All @@ -112,7 +113,6 @@ export default class KmqSongDownloader {
return { songsDownloaded: 0, songsFailed: 0 };
}

await this.reloadYoutubeSessionTokens();
await this.clearPartiallyCachedSongs();
await this.processUnprocessedM4aFiles(db);

Expand Down
6 changes: 5 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ RUN_ID=$(openssl rand -hex 12)

if [ "${MINIMAL_RUN}" != "true" ]; then
echo "Bootstrapping..."
npx ts-node --swc src/seed/bootstrap.ts
if [ "${NODE_ENV}" == "production" ]; then
npx ts-node src/seed/bootstrap.ts
else
npx ts-node --swc src/seed/bootstrap.ts
fi
fi

# run with ts-node + swc, no transpile needed
Expand Down

0 comments on commit 908f86b

Please sign in to comment.