MCPcopy
hub / github.com/benoitc/gunicorn / _handle_dirty

Method _handle_dirty

gunicorn/ctl/server.py:381–396  ·  view source on GitHub ↗

Handle 'dirty' commands.

(self, args: list)

Source from the content-addressed store, hash-verified

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}")

Callers 1

_execute_commandMethod · 0.95

Calls 2

dirty_addMethod · 0.80
dirty_removeMethod · 0.80

Tested by

no test coverage detected