Skip to content
Back to skills

437 Queue Rate Limiting 6b7ef832

ASecurity

return openai.chat.completions.create(...) ``` **Correct (with rate limit):** ```python queue = Queue("llm_tasks", limiter={"limit": 50, "period": 30}) @DBOS.step() def call_llm(prompt): return openai.chat.completions.create(...) @DBOS.workflow() def process_prompts(prompts): handles = [] for prompt in prompts: handle = queue.enqueue(call_llm, prompt) handles.append(handle) return [h.get_result() for h in handles] ``` Rate limit parameters: - `limit`: Maximum number of functions to start in t...

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
ai-agentspythonapi

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 437-queue-rate-limiting_6b7ef832 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 437 Queue Rate Limiting 6b7ef832?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 437 Queue Rate Limiting 6b7ef832
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-437-queue-rate-limiting-6b7ef832/badge)](https://www.skillsdirectory.com/skills/tools-only-437-queue-rate-limiting-6b7ef832)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
title: Rate Limit Queue Execution
impact: HIGH
impactDescription: Prevents hitting API rate limits
tags: queue, rate-limit, api, throttle
---

## Rate Limit Queue Execution

Use rate limits when working with rate-limited APIs (like LLM APIs). Limits are global across all processes.

**Incorrect (no rate limiting):**

```python
queue = Queue("llm_tasks")

@DBOS.step()
def call_llm(prompt):
    # May hit rate limits if too many calls
    return openai.chat.completions.create(...)
```

**Correct (with rate limit):**

```python
# Max 50 tasks started per 30 seconds
queue = Queue("llm_tasks", limiter={"limit": 50, "period": 30})

@DBOS.step()
def call_llm(prompt):
    return openai.chat.completions.create(...)

@DBOS.workflow()
def process_prompts(prompts):
    handles = []
    for prompt in prompts:
        # Queue enforces rate limit
        handle = queue.enqueue(call_llm, prompt)
        handles.append(handle)
    return [h.get_result() for h in handles]
```

Rate limit parameters:
- `limit`: Maximum number of functions to start in the period
- `period`: Time period in seconds

Rate limits can be combined with concurrency limits:

```python
queue = Queue("api_tasks",
    worker_concurrency=5,
    limiter={"limit": 100, "period": 60})
```

Reference: [Rate Limiting](https://docs.dbos.dev/python/tutorials/queue-tutorial#rate-limiting)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.