Improved autonomies names, cron job return
This commit is contained in:
parent
de7c56d99b
commit
9ee01a6ef8
3 changed files with 13 additions and 10 deletions
|
|
@ -34,6 +34,7 @@ const countFires = (regions, stringsToRemove) => {
|
|||
|
||||
regions.features.forEach((region) => {
|
||||
const regionName = cleanProv(region.properties.name, stringsToRemove);
|
||||
if (debug) console.log(`${regionName} -----`);
|
||||
try {
|
||||
const fires = findFiresInRegion(region);
|
||||
// TODO Also check neighbour fires (when better implementation of that part)
|
||||
|
|
|
|||
|
|
@ -16,11 +16,12 @@ const stringsToRemove = [
|
|||
['Región de', ''],
|
||||
['Valencia', 'CValenciana'],
|
||||
['Comunidad de Madrid', 'CMadrid'],
|
||||
['La Mancha', 'CLMancha'],
|
||||
['León', 'CyL'],
|
||||
['León', 'CyLeón'],
|
||||
['Leon', 'CyLeón'],
|
||||
['Castilla-', ''],
|
||||
['Cataluña/', ''],
|
||||
['Cataluña', 'Catalunya'],
|
||||
['La Mancha', 'CLMancha'],
|
||||
['Baleares', 'IllesBalears'],
|
||||
['Galicia', 'Galiza'],
|
||||
['Principado de', ''],
|
||||
|
|
@ -65,7 +66,9 @@ const tweetFires = () => {
|
|||
} else {
|
||||
tweet(tweetText, 'es');
|
||||
}
|
||||
return tweetText;
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
if (Meteor.isDevelopment) {
|
||||
|
|
|
|||
|
|
@ -55,14 +55,13 @@ Meteor.startup(() => {
|
|||
}
|
||||
return sched;
|
||||
},
|
||||
job: () => {
|
||||
tweetFires();
|
||||
// console.log('cron is working');
|
||||
/* console.log(this.userID) // Context Object becomes this argument
|
||||
* console.log(this.magic) /
|
||||
* var numbersCrunched = CrushSomeNumbers();
|
||||
* return numbersCrunched; */
|
||||
}
|
||||
job: () => tweetFires()
|
||||
/* console.log('cron is working');
|
||||
* console.log(this.userID) // Context Object becomes this argument
|
||||
* console.log(this.magic) /
|
||||
* var numbersCrunched = CrushSomeNumbers();
|
||||
* return numbersCrunched;
|
||||
return tweetFires(); */
|
||||
});
|
||||
|
||||
SyncedCron.start();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue