This commit is contained in:
2025-08-23 22:17:36 +02:00
2 changed files with 5 additions and 7 deletions

View File

@ -18,8 +18,6 @@ const servers = [
baseUrl: process.env.SERVER1_COMFY_BASE_URL,
outputDir: process.env.SERVER1_COMFY_OUTPUT_DIR,
},*/
{
baseUrl: process.env.SERVER2_COMFY_BASE_URL,
outputDir: process.env.SERVER2_COMFY_OUTPUT_DIR,
@ -63,7 +61,7 @@ async function worker(server: any) {
while (true) {
await sleep(Math.random() * 3000); // Random delay
const videosToProcess = (await query(
"SELECT * FROM video WHERE image_prompt IS NOT NULL AND (video_path IS NULL OR image_path = '') LIMIT 1"
"SELECT * FROM video WHERE (video_path IS NULL OR video_path = '') AND modified_at < '2025-08-22' LIMIT 1"
)) as any[];
if (videosToProcess.length === 0) {

View File

@ -65,7 +65,7 @@ async function generateImage(
const sourcePath = path.join(COMFY_OUTPUT_DIR!, latestFile);
try {
await fs.unlink(sourcePath);
await fs.unlink(newFilePath);
} catch (err) {
// ignore if not exists
}