added function to update latest images

This commit is contained in:
Quentin Roussel
2024-08-18 01:17:50 +08:00
parent ab1d1669a6
commit 16851517ef
5 changed files with 42 additions and 5 deletions

View File

@@ -1,6 +1,11 @@
import { initImages } from './generate.mjs';
import { initImages, updateImages } from './generate.mjs';
initImages(10).then(() => {
console.log('Downloaded images successfully');
console.log('Downloaded initial images successfully');
});
setInterval(() => {
updateImages(10).then(() => {
console.log('Updated images successfully');
});
}, 5 * 60 * 1000);