mirror of
https://git.roussel.pro/public-website/singapore_rain_radar.git
synced 2026-02-09 02:20:17 +01:00
make sure that init downloads exactly the last count available images
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { initImages, updateImages } from './downloader.mjs';
|
||||
|
||||
initImages(10).then(() => {
|
||||
const IMAGE_COUNT = 5;
|
||||
|
||||
initImages(IMAGE_COUNT).then(() => {
|
||||
console.log('Downloaded initial images successfully');
|
||||
});
|
||||
|
||||
setInterval(() => {
|
||||
updateImages(10).then(() => {
|
||||
updateImages(IMAGE_COUNT).then(() => {
|
||||
console.log('Updated images successfully');
|
||||
});
|
||||
}, 5 * 60 * 1000);
|
||||
|
||||
Reference in New Issue
Block a user