RunnerArguments: add handle_sigint/handle_sigterm
This commit is contained in:
@@ -10,7 +10,7 @@ These types are used by the development runner to pass transport-specific
|
||||
information to bot functions.
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any
|
||||
|
||||
from fastapi import WebSocket
|
||||
@@ -20,7 +20,12 @@ from fastapi import WebSocket
|
||||
class RunnerArguments:
|
||||
"""Base class for runner session arguments."""
|
||||
|
||||
pass
|
||||
handle_sigint: bool = field(init=False)
|
||||
handle_sigterm: bool = field(init=False)
|
||||
|
||||
def __post_init__(self):
|
||||
self.handle_sigint = True
|
||||
self.handle_sigterm = False
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user