def sigterm(self) -> None:
if self.stop_attempts < <NUM_LIT:1>:<EOL><INDENT>Log.info('<STR_LIT>')<EOL>self.stop_attempts += <NUM_LIT:1><EOL>self.terminate()<EOL><DEDENT>else:<EOL><INDENT>Log.info('<STR_LIT>')<EOL><DEDENT>
Handle SIGTERM from the system by stopping tasks gracefully.
        Repeated signals will be ignored while waiting for tasks to finish.