BusinessConfig#
- pydantic model mobu.models.business.base.BusinessConfig#
Base configuration class for monkey business.
Each type of business must override this class, redefining
type
with a different literal andoptions
with a different type and default factory.- Parameters:
data (
Any
)
Show JSON schema
{ "title": "BusinessConfig", "description": "Base configuration class for monkey business.\n\nEach type of business must override this class, redefining ``type`` with a\ndifferent literal and ``options`` with a different type and default\nfactory.", "type": "object", "properties": { "type": { "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/BusinessOptions", "title": "Options for the monkey business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "$defs": { "BusinessOptions": { "additionalProperties": false, "description": "Options for monkey business.", "properties": { "error_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 600 ], "title": "How long to wait after an error before restarting" }, "idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "After each loop executing monkey business, the monkey will pause for this long", "examples": [ 60 ], "title": "How long to wait between business executions" }, "log_level": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level for this monkey business" } }, "title": "BusinessOptions", "type": "object" }, "HumanTimedelta": { "format": "duration", "type": "string" }, "LogLevel": { "description": "Python logging level.\n\nAny case variation is accepted when converting a string to an enum value\nvia the class constructor.", "enum": [ "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL" ], "title": "LogLevel", "type": "string" } }, "additionalProperties": false, "required": [ "type" ] }
- Config:
extra: str = forbid
- Fields:
- field options: BusinessOptions [Optional]#
- field restart: bool = False#
- field type: str [Required]#