Skip to content

Commit

Permalink
fix dates
Browse files Browse the repository at this point in the history
  • Loading branch information
folland87 committed Dec 6, 2024
1 parent fe70d58 commit 32d3c4b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/jobs/sirene/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ export default async function monitorSiren(job) {
const from = lastSuccessfullExecution
? lastSuccessfullExecution.result?.lastExecution
?.toISOString()
?.split("T")?.[0]
: now.toISOString().split("T")?.[0];
?.slice(0, 19)
: now.toISOString().slice(0, 19);

const siretStockFromPaysage = await getSiretStockFromPaysage();

await new Promise((resolve) => setTimeout(resolve, 100000));
const until = new Date().toISOString().split("T")?.[0];
const until = new Date().toISOString().slice(0, 19);
const updatesInSirene = await fetchSireneUpdates(from, until);
console.log(updatesInSirene?.length, updatesInSirene);

Expand Down

0 comments on commit 32d3c4b

Please sign in to comment.