Watchdog for bot process

This commit is contained in:
Anton Ermak
2017-12-28 12:14:34 +07:00
parent e46fcf0e02
commit 5ba255f635
3 changed files with 94 additions and 0 deletions

View File

@@ -142,6 +142,12 @@ def parse_args(args: List[str], description: str):
metavar='INT',
nargs='?',
)
parser.add_argument(
'-w', '--watchdog',
help='Run under watchdog (restart process if main loop is stalled)', # noqa
action='store_true',
dest='watchdog_enable',
)
build_subcommands(parser)
return parser.parse_args(args)