Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
habdelra committed May 15, 2024
1 parent ca40a37 commit 74452b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion packages/realm-server/pg-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
asExpressions,
Deferred,
Job,
reportError,
} from '@cardstack/runtime-common';
import PgAdapter from './pg-adapter';

Expand Down Expand Up @@ -338,9 +339,16 @@ export default class PgQueue implements Queue {
log.debug(`running %s`, coalescedIds);
result = await this.runJob(firstJob.category, firstJob.args);
newStatus = 'resolved';
} catch (err) {
} catch (err: any) {
console.error(
`Error running job ${firstJob.id}: category=${
firstJob.category
} queue=${firstJob.queue} args=${JSON.stringify(firstJob.args)}`,
err,
);
result = serializableError(err);
newStatus = 'rejected';
reportError(err);
}
log.debug(`finished %s as %s`, coalescedIds, newStatus);
await query([
Expand Down
2 changes: 1 addition & 1 deletion packages/realm-server/scripts/start-staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pnpm setup:base-in-deployment
pnpm setup:drafts-in-deployment
pnpm setup:published-in-deployment
NODE_NO_WARNINGS=1 \
LOG_LEVELS='*=info' \
LOG_LEVELS='current-run=debug' \
ts-node \
--transpileOnly main \
--port=3000 \
Expand Down

0 comments on commit 74452b9

Please sign in to comment.