save changes
This commit is contained in:
@ -15,11 +15,9 @@ interface VideoRecord {
|
||||
|
||||
const servers = [
|
||||
/*{
|
||||
baseUrl: process.env.SERVER1_COMFY_BASE_URL,
|
||||
outputDir: process.env.SERVER1_COMFY_OUTPUT_DIR,
|
||||
},*/
|
||||
|
||||
|
||||
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) {
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user