Skip to content

Commit

Permalink
fix: enable expense scraping in updater and schedule job to run daily
Browse files Browse the repository at this point in the history
  • Loading branch information
robertotcestari committed Sep 16, 2024
1 parent 4bbda77 commit d3bcfe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/features/codante-apis/senator-expenses/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function updater() {

// update expenses
console.log('Scraping expenses...');
// await scrapeExpenses(YEAR);
await scrapeExpenses(YEAR);

// update summaries
console.log('Updating party summary...');
Expand Down
7 changes: 1 addition & 6 deletions src/scheduler/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { Cron } from 'croner';
import { updater } from '../features/codante-apis/senator-expenses/updater';

// const job = Cron('0 2 * * *', async () => {
// console.log('Running ');
// await updater();
// });

const job = Cron('* * * * *', async () => {
const job = Cron('0 2 * * *', async () => {
console.log('Running ');
await updater();
});

0 comments on commit d3bcfe8

Please sign in to comment.