Skip to content

Commit

Permalink
Revert "graceful shutdown protocol implemented for ai highlighter (#5268
Browse files Browse the repository at this point in the history
)" (#5271)

This reverts commit bc3c6a7.
  • Loading branch information
gettinToasty authored Dec 18, 2024
1 parent bc3c6a7 commit f0dd903
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/services/highlighter/ai-highlighter/ai-highlighter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AiHighlighterUpdater } from './updater';
import { duration } from 'moment';
import { ICoordinates } from '..';
import kill from 'tree-kill';
import { getOS, OS } from 'util/operating-systems';

export enum EHighlighterInputTypes {
KILL = 'kill',
Expand Down Expand Up @@ -131,13 +130,7 @@ export function getHighlightClips(
cancelSignal.addEventListener('abort', () => {
console.log('ending highlighter process');
messageBuffer.clear();

// windows doesn't support signals and we have to use the custom graceful shutdown
if (getOS() === OS.Windows) {
childProcess.stdin?.write('quit\n');
} else {
kill(childProcess.pid!, 'SIGINT');
}
kill(childProcess.pid!, 'SIGINT');
reject(new Error('Highlight generation canceled'));
});
}
Expand Down

0 comments on commit f0dd903

Please sign in to comment.