HEX
Server: LiteSpeed
System: Linux srv1.dhviews.com 5.14.0-570.23.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jun 24 11:27:16 EDT 2025 x86_64
User: bdedition (1723)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //proc/thread-self/root/usr/local/lib/python3.9/site-packages/wordfence/cli/configure/configure.py
from ..subcommands import Subcommand
from ..configurer import MIN_WORKERS


class ConfigureSubcommand(Subcommand):

    def invoke(self) -> int:
        configurer = self.context.configurer
        configurer.overwrite = self.config.overwrite
        configurer.request_license = self.config.request_license
        if self.config.workers is not None \
                and self.config.workers < MIN_WORKERS:
            if self.config.is_from_cli('workers'):
                raise ValueError(
                        'The number of workers cannot be less than '
                        f'{MIN_WORKERS}'
                    )
            self.config.workers = MIN_WORKERS
        configurer.workers = self.config.workers
        configurer.default = self.config.default
        configurer.prompt_for_config()
        return 0


factory = ConfigureSubcommand