Handle 'dirty' commands.
(self, args: list)
| 379 | raise ValueError(f"Unknown worker action: {action}") |
| 380 | |
| 381 | def _handle_dirty(self, args: list) -> dict: |
| 382 | """Handle 'dirty' commands.""" |
| 383 | if not args: |
| 384 | raise ValueError("Missing dirty action (add|remove)") |
| 385 | |
| 386 | action = args[0].lower() |
| 387 | action_args = args[1:] |
| 388 | |
| 389 | if action == "add": |
| 390 | count = int(action_args[0]) if action_args else 1 |
| 391 | return self.handlers.dirty_add(count) |
| 392 | elif action == "remove": |
| 393 | count = int(action_args[0]) if action_args else 1 |
| 394 | return self.handlers.dirty_remove(count) |
| 395 | else: |
| 396 | raise ValueError(f"Unknown dirty action: {action}") |
no test coverage detected