mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-26 11:35:10 +00:00
Add process.exit(0) to sample applications
Add process.exit(0) so that sample javascript and typescript applications exit with success upon completion instead of hanging. Signed-off-by: David Enyeart <enyeart@us.ibm.com>
This commit is contained in:
parent
1cd71fd26a
commit
3160f91569
19 changed files with 20 additions and 2 deletions
|
|
@ -175,6 +175,7 @@ async function main() {
|
|||
} catch (error) {
|
||||
console.error(`******** FAILED to run the application: ${error}`);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ async function main() {
|
|||
} catch (error) {
|
||||
console.error(`******** FAILED to run the application: ${error}`);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ async function main() {
|
|||
}
|
||||
|
||||
console.log('*** application ending');
|
||||
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -353,6 +353,7 @@ async function main() {
|
|||
}
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -344,6 +344,7 @@ async function main() {
|
|||
}
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -563,5 +563,6 @@ async function main() {
|
|||
process.exit(1);
|
||||
}
|
||||
console.log(`${GREEN} **** END ****${RESET}`);
|
||||
process.exit(0);
|
||||
}
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ async function main () {
|
|||
// Disconnect from the gateway
|
||||
console.log('Disconnect from Fabric gateway.');
|
||||
gateway.disconnect();
|
||||
process.exit(0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ async function main() {
|
|||
// Disconnect from the gateway
|
||||
console.log('Disconnect from Fabric gateway.');
|
||||
gateway.disconnect();
|
||||
process.exit(0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ async function main() {
|
|||
// Disconnect from the gateway
|
||||
console.log('Disconnect from Fabric gateway.')
|
||||
gateway.disconnect();
|
||||
process.exit(0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ async function main() {
|
|||
// Disconnect from the gateway
|
||||
console.log('Disconnect from Fabric gateway.');
|
||||
gateway.disconnect();
|
||||
process.exit(0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ async function main() {
|
|||
// Disconnect from the gateway
|
||||
console.log('Disconnect from Fabric gateway.');
|
||||
gateway.disconnect();
|
||||
process.exit(0);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ async function main() {
|
|||
console.error(`Failed to enroll admin user "admin": ${error}`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ async function main() {
|
|||
console.error(`Failed to submit transaction: ${error}`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ async function main() {
|
|||
console.error(`Failed to evaluate transaction: ${error}`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ async function main() {
|
|||
console.error(`Failed to register user "appUser": ${error}`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ async function main() {
|
|||
console.error(`Failed to enroll admin user "admin": ${error}`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ async function main() {
|
|||
console.error(`Failed to submit transaction: ${error}`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ async function main() {
|
|||
console.error(`Failed to evaluate transaction: ${error}`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ async function main() {
|
|||
console.error(`Failed to register user "appUser": ${error}`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
main();
|
||||
|
|
|
|||
Loading…
Reference in a new issue