MCPcopy
hub / github.com/midrender/revideo / scheduleCleanup

Function scheduleCleanup

packages/cli/src/utils.ts:3–15  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

1import {promises as fs} from 'fs';
2
3export function scheduleCleanup(filePath: string) {
4 const clean = async () => {
5 try {
6 await fs.unlink(filePath);
7 console.log(`Successfully deleted file: ${filePath}`);
8 } catch (error) {
9 console.error(`Error deleting file ${filePath}: ${error}`);
10 }
11 };
12
13 // Wait 10 minutes before removing file.
14 setTimeout(clean, 10 * 60 * 1000);
15}

Callers 2

renderWithCallbackFunction · 0.90
renderWithoutCallbackFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected