Duriin-API/src/state.js

14 lines
290 B
JavaScript

const ingestionState = new Map();
function markSourceRun(source) {
ingestionState.set(source, new Date().toISOString());
}
function getLastIngestionBySource() {
return Object.fromEntries(ingestionState.entries());
}
module.exports = {
markSourceRun,
getLastIngestionBySource,
};