Plugin jobs: a way to fail a run without retrying it

Aperta
#664 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
laravel, php
Ambito
backend

Direzione di ricerca

Start in the teme/contracts package, where plugin job handlers and their tries/backoff settings are declared, and find where core runs those jobs and handles a thrown exception. Add a way for a handler to throw a JobFailed::permanently(...) error that core records as failed with the reason and does not retry. Done when a test with a job of tries: 3 that fails permanently runs once, and the plugin handbook's jobs page documents the new error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/plugins type/enhancement when/later

A plugin's job can declare tries and backoff, but its handler can't say that one failure isn't worth retrying. Teme SEO's Search Console job, when the site isn't connected to Search Console, should fail once and say so; a network blip should still be retried. Today the only choice is tries: 1 for every failure, which is what Teme SEO 1.0.2 does.

Expected: teme/contracts gives a handler a way to fail a run for good, such as a JobFailed::permanently("reason in plain words") it throws, which core records as failed with that reason and doesn't retry, whatever tries says. Documented in the plugin handbook's jobs page; a test with a job of tries: 3 that fails permanently runs once.

🤖 Generated with Claude Code

Lingua principale
PHP
Stelle
1
Fork
1
Merge medio
1h 40m
PR unite (30g)
143

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di temecms/teme

Tutte le issue di temecms/teme

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.