Update server.js
Browse files
server.js
CHANGED
|
@@ -24,8 +24,8 @@ const fetchDataAndUpdateCache = async (url, cacheKey) => {
|
|
| 24 |
};
|
| 25 |
|
| 26 |
// Schedule to update cache every 15 minutes for all endpoints
|
| 27 |
-
cron.schedule('*/15 * * * *', async () => {
|
| 28 |
-
|
| 29 |
// Example: Update current season data
|
| 30 |
await fetchDataAndUpdateCache(`${ERGAST_API_BASE_URL}current.json`, 'currentSeason');
|
| 31 |
|
|
|
|
| 24 |
};
|
| 25 |
|
| 26 |
// Schedule to update cache every 15 minutes for all endpoints
|
| 27 |
+
//cron.schedule('*/15 * * * *', async () => {
|
| 28 |
+
cron.schedule('0 */12 * * *', async () => {
|
| 29 |
// Example: Update current season data
|
| 30 |
await fetchDataAndUpdateCache(`${ERGAST_API_BASE_URL}current.json`, 'currentSeason');
|
| 31 |
|