Skip to content

Commit 5b0a5a7

Browse files
committed
add logs on all runtime envs
1 parent f7c2976 commit 5b0a5a7

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

agents/src/cli.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const runWorker = async (args: CliArgs) => {
3232
}
3333

3434
process.once('SIGINT', async () => {
35+
logger.info('SIGINT received in CLI');
3536
// allow C-c C-c for force interrupt
3637
process.once('SIGINT', () => {
3738
logger.info('worker closed forcefully');
@@ -46,6 +47,7 @@ const runWorker = async (args: CliArgs) => {
4647
});
4748

4849
process.once('SIGTERM', async () => {
50+
logger.info('SIGTERM received in CLI');
4951
if (args.production) {
5052
await worker.drain();
5153
}

agents/src/ipc/inference_proc_lazy_main.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ const ORPHANED_TIMEOUT = 15 * 1000;
1212
if (process.send) {
1313
// don't do anything on C-c
1414
// this is handled in cli, triggering a termination of all child processes at once.
15-
process.on('SIGINT', () => {});
15+
process.on('SIGINT', () => {
16+
logger.info('SIGINT received in inference proc');
17+
});
1618

1719
// don't do anything on SIGTERM
1820
// Render uses SIGTERM in autoscale, this ensures the processes are properly drained if needed
19-
process.on('SIGTERM', () => {});
21+
process.on('SIGTERM', () => {
22+
logger.info('SIGTERM received in inference proc');
23+
});
2024

2125
await once(process, 'message').then(([msg]: IPCMessage[]) => {
2226
msg = msg!;

agents/src/ipc/job_proc_lazy_main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ const startJob = (
139139
// don't do anything on C-c
140140
// this is handled in cli, triggering a termination of all child processes at once.
141141
process.on('SIGINT', () => {
142-
logger.debug('SIGINT received');
142+
logger.info('SIGINT received in job proc');
143143
});
144144

145145
// don't do anything on SIGTERM
146146
// Render uses SIGTERM in autoscale, this ensures the processes are properly drained if needed
147147
process.on('SIGTERM', () => {
148-
logger.debug('SIGTERM received');
148+
logger.info('SIGTERM received in job proc');
149149
});
150150

151151
await once(process, 'message').then(([msg]: IPCMessage[]) => {

0 commit comments

Comments
 (0)