Skip to content

Commit

Permalink
Add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
malted committed Feb 20, 2025
1 parent 75577ad commit fc468f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export function registerJobs() {
const minuteCronStart = performance.now();
track("job-sync");
// Loop through users.
app.logger.info("SELECTING...");
sql`select * from users where clan_id is not null;`.then(async (users) => {
users.forEach(async (user) => {
for (
Expand Down Expand Up @@ -251,6 +252,7 @@ export function registerJobs() {
},
).then((res) => res.json());

app.logger.info("INSERTING...");
await sql`insert into user_hakatime_daily_summary (user_id, date, summary) values (${user.slack_id}, ${date}, ${summaryRes}) on conflict (user_id, date) do update set summary = excluded.summary;`;
}
});
Expand Down

0 comments on commit fc468f7

Please sign in to comment.