mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-06 19:00:52 -04:00
* spelling: accidentally * spelling: announce * spelling: assembly * spelling: avoid * spelling: backend * spelling: because * spelling: claimed * spelling: candidate * spelling: certification * spelling: certified * spelling: challenge * spelling: circular * spelling: it isn't * spelling: coins * spelling: combination * spelling: compliant * spelling: containers * spelling: concise * spelling: deprecated * spelling: development * spelling: donor * spelling: error * spelling: everything * spelling: exceed * spelling: exist * spelling: falsy * spelling: faulty * spelling: forward * spelling: handle * spelling: indicates * spelling: initial * spelling: integers * spelling: issealed * spelling: javascript * spelling: length * spelling: maximum * spelling: minimum * spelling: mutable * spelling: notifier * spelling: coordinate * spelling: passport * spelling: perform * spelling: permuter * spelling: placeholder * spelling: progressively * spelling: semantic * spelling: submission * spelling: submit * spelling: translations * spelling: turquoise * spelling: visualization * spelling: without * spelling: registration * spelling: representation
36 lines
792 B
JavaScript
36 lines
792 B
JavaScript
const envPath = require('path').resolve(__dirname, '../../../.env');
|
|
require('dotenv').config({ path: envPath });
|
|
|
|
const { zip, timer, from } = require('rxjs');
|
|
|
|
/*
|
|
* The below has been commented out to avoid inadvertant
|
|
* ops usage with algolia
|
|
*/
|
|
|
|
// const { getStoryData } = require('./news');
|
|
// const { insertYoutube } = require('./youtube');
|
|
// const { insertChallenges } = require('./challenges');
|
|
// const { insertGuides } = require('./guides');
|
|
|
|
const dataSources = [
|
|
// insertGuides,
|
|
// insertChallenges
|
|
// insertYoutube,
|
|
// disable this until the roll out of news
|
|
// getStoryData
|
|
];
|
|
|
|
function init() {
|
|
return zip(timer(0, 5000), from(dataSources), (a, b) => b).subscribe(
|
|
fn => {
|
|
fn();
|
|
},
|
|
err => {
|
|
throw new Error(err);
|
|
}
|
|
);
|
|
}
|
|
|
|
init();
|