mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
refactor(core): Patch Bull to include stack trace on job fail (#12547)
This commit is contained in:
parent
7227a29845
commit
4ca794228b
|
@ -90,6 +90,7 @@
|
|||
"ws": ">=8.17.1"
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"bull@4.12.1": "patches/bull@4.12.1.patch",
|
||||
"pkce-challenge@3.0.0": "patches/pkce-challenge@3.0.0.patch",
|
||||
"pyodide@0.23.4": "patches/pyodide@0.23.4.patch",
|
||||
"@types/express-serve-static-core@4.17.43": "patches/@types__express-serve-static-core@4.17.43.patch",
|
||||
|
|
21
patches/bull@4.12.1.patch
Normal file
21
patches/bull@4.12.1.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
diff --git a/lib/job.js b/lib/job.js
|
||||
index 6a3606974fd3e397c6c5b2b6e65b20670c68f753..4cdbed1d564ceeb5a80c92eb605e49cfd3c8ccdd 100644
|
||||
--- a/lib/job.js
|
||||
+++ b/lib/job.js
|
||||
@@ -511,9 +511,14 @@ Job.prototype.finished = async function() {
|
||||
}
|
||||
};
|
||||
|
||||
- const onFailed = (jobId, failedReason) => {
|
||||
+ const onFailed = async (jobId, failedReason) => {
|
||||
if (String(jobId) === String(this.id)) {
|
||||
- reject(new Error(failedReason));
|
||||
+ const job = await Job.fromId(this.queue, this.id);
|
||||
+ const error = new Error(failedReason);
|
||||
+ if (job && job.stacktrace && job.stacktrace.length > 0) {
|
||||
+ error.stack = job.stacktrace.join('\n');
|
||||
+ }
|
||||
+ reject(error);
|
||||
removeListeners();
|
||||
}
|
||||
};
|
|
@ -130,6 +130,9 @@ patchedDependencies:
|
|||
'@types/ws@8.5.4':
|
||||
hash: nbzuqaoyqbrfwipijj5qriqqju
|
||||
path: patches/@types__ws@8.5.4.patch
|
||||
bull@4.12.1:
|
||||
hash: ep6h4rqtpclldfcdohxlgcb3aq
|
||||
path: patches/bull@4.12.1.patch
|
||||
pkce-challenge@3.0.0:
|
||||
hash: dypouzb3lve7vncq25i5fuanki
|
||||
path: patches/pkce-challenge@3.0.0.patch
|
||||
|
@ -822,7 +825,7 @@ importers:
|
|||
version: 2.4.3
|
||||
bull:
|
||||
specifier: 4.12.1
|
||||
version: 4.12.1
|
||||
version: 4.12.1(patch_hash=ep6h4rqtpclldfcdohxlgcb3aq)
|
||||
cache-manager:
|
||||
specifier: 5.2.3
|
||||
version: 5.2.3
|
||||
|
@ -19827,7 +19830,7 @@ snapshots:
|
|||
- supports-color
|
||||
optional: true
|
||||
|
||||
bull@4.12.1:
|
||||
bull@4.12.1(patch_hash=ep6h4rqtpclldfcdohxlgcb3aq):
|
||||
dependencies:
|
||||
cron-parser: 4.9.0
|
||||
get-port: 5.1.1
|
||||
|
|
Loading…
Reference in a new issue