remove config module import from content.js and add rebuild-api.sh script for Docker management

This commit is contained in:
ImBenji 2026-04-17 03:14:22 +01:00
parent 8a02722789
commit 2d058ca2e8
2 changed files with 10 additions and 2 deletions

9
rebuild-api.sh Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
sudo docker compose down
sudo docker compose build --no-cache
sudo docker compose up -d
sudo docker compose logs --tail=50

View file

@ -1,6 +1,5 @@
const { extract } = require('@extractus/article-extractor'); const { extract } = require('@extractus/article-extractor');
const sharp = require('sharp'); const sharp = require('sharp');
const config = require('./config');
const db = require('./db'); const db = require('./db');
const { generateAndStoreEmbedding } = require('./embeddings'); const { generateAndStoreEmbedding } = require('./embeddings');
const { fetchWithPolicy } = require('./http'); const { fetchWithPolicy } = require('./http');
@ -211,7 +210,7 @@ async function fetchAndStoreContent(id, url) {
} }
} }
async function backfillMissingContent(limit = config.contentBackfill.batchSize || 10) { async function backfillMissingContent(limit = 10) {
if (contentBackfillRunning) { if (contentBackfillRunning) {
return; return;
} }