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

Method dirty_add

gunicorn/ctl/handlers.py:308–327  ·  view source on GitHub ↗

Spawn additional dirty workers. Sends a MANAGE message to the dirty arbiter to spawn workers. Args: count: Number of dirty workers to add (default 1) Returns: Dictionary with added count or error

(self, count: int = 1)

Source from the content-addressed store, hash-verified

306 }
307
308 def dirty_add(self, count: int = 1) -> dict:
309 """
310 Spawn additional dirty workers.
311
312 Sends a MANAGE message to the dirty arbiter to spawn workers.
313
314 Args:
315 count: Number of dirty workers to add (default 1)
316
317 Returns:
318 Dictionary with added count or error
319 """
320 if not self.arbiter.dirty_arbiter_pid:
321 return {
322 "success": False,
323 "error": "Dirty arbiter not running",
324 }
325
326 count = max(1, int(count))
327 return self._send_manage_message("add", count)
328
329 def dirty_remove(self, count: int = 1) -> dict:
330 """

Callers 3

_handle_dirtyMethod · 0.80

Calls 1

_send_manage_messageMethod · 0.95

Tested by 2