Queues: ten tasks and go to sleep|INEMA.CLUB-PRO

Lesson 5 · 18 min

Ten tasks and go to sleep

With the bot running, your paper queue becomes messages. Each line is a skill with an input; the bot puts each request in the right queue, runs it within that skill’s limits, and lets you know in the chat when it’s done.

Start lesson
A hand holding a phone with messages sent one after another, with a blurred monitor in the background.

In this lesson, you’ll

  1. 1The format of a request: skill, input, and fields
  2. 2The five queues and why the render queue runs one at a time
  3. 3Track with /fila, /jobs, and /status
  4. 4What not to do while the batch is running

Goal: send 5 to 10 tasks in skill format and track the batch with /fila and /jobs.

01From a message to a notification

The path each batch request takes.

Scroll down: each step below lights up its part of the diagram.

  1. 1/6

    Message

    One line per task. The name before the colon is the skill; the input comes after it; optional fields go after a vertical bar.

  2. 2/6

    Catalog

    The bot looks up the skill in the catalog. It lists which queue the skill runs in, the maximum deadline, and how many attempts it gets. A skill that isn’t in the catalog is rejected right away.

  3. 3/6

    Queue type

    Each queue has its own limit. All ten video requests can be added, but the render queue runs one at a time because they share the graphics card.

  4. 4/6

    Agent

    The worker builds the skill prompt with your input and calls the agent. It works on its own, without asking for confirmation, and ends with RESULT or ERRO.

  5. 5/6

    Notification

    When it finishes, the bot sends the result or the reason for failure in the chat. In the morning, the conversation is your report.

  6. 6/6

    Ten messages, one night

    You send the whole list at once. The bot distributes tasks across queues, respects the limits, and replies to each one when it’s done.

Click each block. Queue and limit numbers come from the inemaccbot documentation.

02How to write and track the batch

1. The request format

<skill>: <input> [| field]. The input is what you put in the "Input" column of your queue on paper.

/skills lists the installed skills, and /ajuda <skill> shows each skill’s fields. A field written without the bar is rejected; it won’t silently become part of the input.

Exampleexplicativo: what is a durable queue | vertical

03The overnight batch

Replace the examples with lines from your queue on paper. One message per task.

Telegram · messages to the bot
transcrever: https://link-da-gravacao-de-segunda
transcrever: https://link-da-aula-gravada
explicativo: what is a durable queue | vertical
dublar: https://link-do-video-em-ingles
transcrever: https://link-do-podcast | modelo=haiku
Telegram · track and intervene
/fila
/jobs
/status j13
/furar j15
/cancelar j14
Terminal · before restarting the bot
sqlite3 inemaccbot.db \
  "select id,fila,tarefa,status,flow_ref from jobs where status in ('queued','running');"
# vazio → pode reiniciar. Com render rodando → espere.
Simulation: illustrative example
text   · running 2 · waiting 1 · errors 24h 0
render  · running 1 · waiting 2 · errors 24h 0
io      · running 0 · waiting 0 · errors 24h 0

Illustration of the kind of information; the bot’s exact text may vary.

04Practice

Use your queue on paper. Start with tasks without a gate.

E4 · Ten tasks and go to sleep

1 night

Send the bot 5 to 10 tasks from your list (transcribe, summarize, explainer…). Check /fila once, then go do something else. Don’t restart the bot until the queue is empty.

Done when: `/fila` showed the distributed batch, and the next day, each task has a reply in the chat (result or reason for failure).

The morning check is lesson 7. Original exercise: 03-filas.md (E4).

05Test what you learned

The explanation appears after your answer.

Question 1 of 3

You sent four explainer video requests. Why is only one showing as running?

To learn more

Previous lessonNext lesson