(self, *, parser: ArgumentParser, subparsers: _ArgumentGroup)
Add some plugin-related args so behaviour can be customised
Add some plugin-related args so behaviour can be customised
Add some plugin - related args so behaviour can be customised
async def before_parse_args(self, *, parser: ArgumentParser, subparsers: _ArgumentGroup):
        """Add some plugin-related args so behaviour can be customised"""
        run_command_parser = subparsers.choices["run"]
        state_run_group = run_command_parser.add_argument_group(title="State plugin arguments")
        state_run_group.add_argument(
            "--ping-interval",
            help=(
                "Interval between worker ping events in seconds. Ping events alert the bus that"
                " this Lightbus worker is alive, and are used to update the lightbus admin"
                " interface."
            ),
            metavar="SECONDS",
            type=int,
            default=self.ping_interval,
        )
        state_run_group.add_argument(
            "--no-ping",
            help=(
                "Disable sending ping events on the internal.state API. This "
                "may result in your worker not appearing in the lightbus admin interface, "
                "but will reduce traffic and log volume."
            ),
            action="store_true",
        )
async def before_parse_args ( self , * , parser : ArgumentParser , subparsers : _ArgumentGroup ) : run_command_parser = subparsers . choices [ "run" ] state_run_group = run_command_parser . add_argument_group ( title = "State plugin arguments" ) state_run_group . add_argument ( "--ping-interval" , help = ( "Interval between worker ping events in seconds. Ping events alert the bus that" " this Lightbus worker is alive, and are used to update the lightbus admin" " interface." ) , metavar = "SECONDS" , type = int , default = self . ping_interval , ) state_run_group . add_argument ( "--no-ping" , help = ( "Disable sending ping events on the internal.state API. This " "may result in your worker not appearing in the lightbus admin interface, " "but will reduce traffic and log volume." ) , action = "store_true" , )