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

Method __call__

examples/celery_alternative/tasks.py:498–507  ·  view source on GitHub ↗
(self, action: str, *args, **kwargs)

Source from the content-addressed store, hash-verified

496 self.run_counts = {}
497
498 def __call__(self, action: str, *args, **kwargs) -> Any:
499 method = getattr(self, action, None)
500 if method is None or action.startswith('_'):
501 raise ValueError(f"Unknown action: {action}")
502
503 # Track runs
504 self.last_runs[action] = datetime.now().isoformat()
505 self.run_counts[action] = self.run_counts.get(action, 0) + 1
506
507 return method(*args, **kwargs)
508
509 def cleanup_old_files(self, directory: str, max_age_days: int = 7) -> dict:
510 """

Callers

nothing calls this directly

Calls 2

nowMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected