tests
This commit is contained in:
parent
54f37f9521
commit
3a7254708e
19 changed files with 1560 additions and 1237 deletions
|
|
@ -146,7 +146,7 @@ export class Shutdown {
|
|||
const duration = Date.now() - startTime;
|
||||
|
||||
result = {
|
||||
success: true,
|
||||
success: callbackResult.failed === 0,
|
||||
callbacksExecuted: callbackResult.executed,
|
||||
callbacksFailed: callbackResult.failed,
|
||||
duration,
|
||||
|
|
@ -196,9 +196,9 @@ export class Shutdown {
|
|||
|
||||
// Execute callbacks in order by priority
|
||||
for (const { callback, name, priority } of sortedCallbacks) {
|
||||
executed++; // Count all attempted executions
|
||||
try {
|
||||
await callback();
|
||||
executed++;
|
||||
} catch (error) {
|
||||
failed++;
|
||||
if (name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue