-
Notifications
You must be signed in to change notification settings - Fork 639
/
serverScraper.js
35 lines (33 loc) · 1.61 KB
/
serverScraper.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const { scraper: { executeScraper, executeScraperNYTData, excecuteScraperAppleData, excecuteScraperGov, excecuteScraperVaccine, excecuteScraperVaccineCoverage, excecuteScraperVaccineStateCoverage,
executeScraperTherapeutics, executeScraperVariants, excecuteScraperInfluenza },
config } = require('./routes/instances');
executeScraper();
executeScraperNYTData();
excecuteScraperAppleData();
excecuteScraperGov();
excecuteScraperInfluenza();
excecuteScraperVaccine();
excecuteScraperVaccineCoverage();
excecuteScraperVaccineStateCoverage();
executeScraperTherapeutics();
executeScraperVariants();
// Update Worldometer and Johns Hopkins data every 10 minutes
setInterval(executeScraper, config.worldometersInterval);
// Update NYT data every hour
setInterval(executeScraperNYTData, config.nytInterval);
// Update Apple data every 24 hours
setInterval(excecuteScraperAppleData, config.appleInterval);
// Update Government data every 24 hours
setInterval(excecuteScraperGov, config.govInterval);
// Update vaccine data every 24 hours
setInterval(excecuteScraperVaccine, config.vaccineInterval);
// Update vaccine data every 24 hours
setInterval(excecuteScraperVaccineCoverage, config.vaccineCoverageInterval);
// Update vaccine data every 24 hours
setInterval(excecuteScraperVaccineStateCoverage, config.vaccineCoverageInterval);
// Update therapeutics data every 24 hours
setInterval(executeScraperTherapeutics, config.therapeuticsInterval);
// Update CDC Influenza data every 24 hours
setInterval(excecuteScraperInfluenza, config.cdcInterval);
// Update ECDC data every 24 hours
setInterval(executeScraperVariants, config.variantInterval);