feat: rm failed on sigint
This commit is contained in:
@@ -215,20 +215,6 @@ if (require.main === module) {
|
|||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
process.on('SIGINT', async () => {
|
process.on('SIGINT', async () => {
|
||||||
console.log('Main app shutting down...');
|
console.log('Main app shutting down...');
|
||||||
try {
|
|
||||||
await Run.update(
|
|
||||||
{
|
|
||||||
status: 'failed',
|
|
||||||
finishedAt: new Date().toLocaleString(),
|
|
||||||
log: 'Process interrupted during execution - worker shutdown'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
where: { status: 'running' }
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} catch (error: any) {
|
|
||||||
console.error('Error updating runs:', error);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('Closing PostgreSQL connection pool...');
|
console.log('Closing PostgreSQL connection pool...');
|
||||||
|
|||||||
Reference in New Issue
Block a user