14 lines
290 B
JavaScript
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,
|
|
};
|