Allow plugins to add tasks

Offen
#562 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
nodejs, typescript
Bereich
backend, tooling

Rechercherichtung

Beginne damit, bootstrap über run({ preset: { plugins }, taskList }) und das Plugin-System nachzuverfolgen, und vergleiche anschließend, wie LoadTaskFromJsPlugin und LoadTaskFromExecutableFilePlugin derzeit Tasks registrieren. Als abgeschlossen gilt die Aufgabe, wenn Plugins ihre internen Tasks während bootstrap hinzufügen können, eine testgetriebene Testsuite dieses Verhalten abdeckt und die derzeitige kernspezifische Logik nicht mehr benötigt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Feature description

Give the ability to plugins to mutate tasks list.

Motivating example

I'm using the 0.17.0-rc.0. From discussion in https://github.com/graphile/worker/issues/548, I'm trying to move my logic to the plugin system. However, for ease of use, the plugin would need to setup itself in the graphile worker during bootstrap by adding its own internal tasks.

This would allow to remove any core logic specific for LoadTaskFromJsPlugin & LoadTaskFromExecutableFilePlugin.

This issue is not blocking, since my plugin factory could return the plugin and a task list, like so:

const pluginConfig = MyPlugin(someConfiguration)
await run({
    preset: { plugins: [pluginConfig.plugin] },
    taskList: {...pluginConfig.taskList}
}),

However it's easy to miss, and I think that allowing plugins to add their own tasks make sense

Supporting development

I [tick all that apply]:

  • am interested in building this feature myself
  • am interested in collaborating on building this feature
  • am willing to help testing this feature before it's released
  • am willing to write a test-driven test suite for this feature (before it exists)
  • am a Graphile sponsor ❤️
  • have an active support or consultancy contract with Graphile
Vorherrschende Sprache
TypeScript
Sterne
2.5k
Forks
134
Ø Merge
16 Std. 24 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus graphile/worker

Alle Issues in graphile/worker

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.