Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 17, 2024
1 parent 52df9d2 commit b182299
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/dashboard/jobs/tasks/reconnect/connection.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { client } from "@midday/engine/client";
import { createClient } from "@midday/supabase/job";
import { schemaTask } from "@trigger.dev/sdk/v3";
import { logger, schemaTask } from "@trigger.dev/sdk/v3";
import { syncConnection } from "jobs/tasks/bank/sync/connection";
import { z } from "zod";

Expand Down Expand Up @@ -29,6 +29,8 @@ export const reconnectConnection = schemaTask({

// Update the reference_id of the new connection
if (referenceId) {
logger.info("Updating reference_id of the new connection");

await supabase
.from("bank_connections")
.update({
Expand All @@ -48,6 +50,8 @@ export const reconnectConnection = schemaTask({

const accountsResponse = await accounts.json();

logger.info(accountsResponse);

await Promise.all(
accountsResponse.data.map(async (account) => {
await supabase
Expand Down

0 comments on commit b182299

Please sign in to comment.