Skip to content

Commit c904626

Browse files
committed
🔊 Print a warning when a stage takes over 10 seconds to finish
1 parent cd2d4c5 commit c904626

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Remove support for adding `$_extra_fields` during saving
1717
* Make `Datasource#toDatasource()` work without a callback
1818
* Make `Datasource#toApp()` work without a callback
19+
* Print a warning when a stage takes over 10 seconds to finish
1920

2021
## 1.4.0-alpha.3 (2024-02-25)
2122

‎lib/core/stage.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,12 @@ Stage.setMethod(async function _launch(child_stages) {
551551
if (!this.is_root) {
552552
this.root_stage.emit('launching', this);
553553
}
554+
555+
setTimeout(() => {
556+
if (!this.ended) {
557+
console.warn('Stage "' + this.id + '" is taking a long time...');
558+
}
559+
}, 10 * 1000);
554560
}
555561

556562
if (!this[STATUS]) {

0 commit comments

Comments
 (0)