Skip to content

Commit

Permalink
add console.warn() for all workers process
Browse files Browse the repository at this point in the history
  • Loading branch information
touv committed Sep 13, 2024
1 parent b07879c commit 6bec8a0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/services/enrichment/enrichment.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ export const setEnrichmentError = async (ctx, err) => {
});
jobLogger.info(ctx.job, logData);
notifyListeners(room, logData);
// very useful for identifying the origin of production errors.
console.warn('handleEnrichmentError', err);
notifyListeners(`${ctx.tenant}-enricher`, {
isEnriching: false,
success: false,
Expand Down
1 change: 1 addition & 0 deletions src/api/services/precomputed/precomputed.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ export const setPrecomputedError = async (ctx, err) => {
progress.finish(ctx.tenant);
jobLogger.info(ctx.job, logData);
notifyListeners(room, logData);
console.warn('handlePrecomputedError', err);
notifyListeners(`${ctx.tenant}-precomputer`, {
isPrecomputing: false,
success: false,
Expand Down
2 changes: 2 additions & 0 deletions src/api/workers/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ const handleImportError = async (job, err) => {
if (err instanceof CancelWorkerError) {
await ctx.dataset.drop();
}
// very useful for identifying the origin of production errors.
console.warn('handleImportError', err);
notifyListeners(`${job.data.tenant}-import`, {
isImporting: false,
success: false,
Expand Down
2 changes: 2 additions & 0 deletions src/api/workers/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const startPublishing = async (job) => {
const handlePublishError = async (job, error) => {
const ctx = await prepareContext({ job });
await clearPublished(ctx);
// very useful for identifying the origin of production errors.
console.warn('handlePublisherError', error);
notifyListeners(`${job.data.tenant}-publisher`, {
isPublishing: false,
success: false,
Expand Down

0 comments on commit 6bec8a0

Please sign in to comment.