Schedule jobs inside the caller's EF Core transaction
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 18/100
Piste de recherche
Design work first: read src/TickerNet.EntityFrameworkCore/DbContextFactory/TickerNetDbContext.cs to see how DbContextLease isolates the manager's writes, then draft the ADR in site/decisions/ proposing the API shape (passing a DbContext or DbTransaction) before any code. Done means the ADR is agreed, the public API is listed in the pull request, and tests cover commit-then-job-runs and rollback-then-nothing-scheduled. Comment on the issue to claim it and raise API questions in Discussions.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
What's missing
With EF Core, scheduling a job and saving your own data happen in separate transactions: the managers write through their own DbContext (DbContextLease in src/TickerNet.EntityFrameworkCore/DbContextFactory/TickerNetDbContext.cs). If the app's transaction rolls back, the job is still scheduled, and if the job write fails after the app commits, the work is lost.
Proposal
Let callers schedule time tickers (and add cron tickers) inside a transaction they already have, for example by passing their DbContext or the current DbTransaction, so the job is committed or rolled back together with their data. The scheduler must not see the job before the transaction commits; after commit it should pick the job up promptly.
Notes
- EF Core only to start; document that other providers don't support it.
- Covers the "outbox" use case. Needs an ADR for the API shape.
- Tests: commit then the job runs; rollback then nothing is scheduled.
Part of the TickerQ comparison roadmap. Design it from this description only: never read or copy code, tests or docs from TickerQ 10.5.0 or later, which is under a commercial license (see CONTRIBUTING.md). If it adds or changes public API, add an ADR in site/decisions/ and list the API in the pull request. Comment here if you'd like to pick it up, and ask anything in Discussions.
- Langage dominant
- C#
- Étoiles
- 0
- Forks
- 2
- Merge moyen
- 1 h 8 min
- PR mergées (30 j)
- 24
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TickerNet/TickerNet
-
.NET bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
Add TickerResult.EnsureSuccess()Ouverte.NET enhancement good first issue roadmap
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Document PathBase inside the dashboard branch and WebDAV on IISPeut-être pris @harryhawwy69 l’a pris aujourd’hui. Ouvertedocumentation
Difficulté 2/5 1-3 heures Accessibilité débutants 40/100
Les mainteneurs répondent en général sous 1 jour
-
TickerFunctionProvider's registry is publicly writablePeut-être pris @harryhawwy69 l’a pris aujourd’hui. Ouverte.NET bug
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
Les mainteneurs répondent en général sous 1 jour
-
Cron editor accepts 7 for Sunday, then saving fails with a generic errorPeut-être pris @harryhawwy69 l’a pris aujourd’hui. Ouvertebug good first issue javascript
Difficulté 3/5 1-2 jours Accessibilité débutants 38/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de TickerNet/TickerNet
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
dotnet-outdated/dotnet-outdated#871 ·
Les mainteneurs répondent en général sous 1 jour
-
triage/untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
unoplatform/uno#26676 ·
Les mainteneurs répondent en général sous 1 jour
-
[问题] 导出文件时,提示后面还有1243390911步Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
jhaizhou-ops/S2Arm#2177 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
area-CodeGen-coreclr untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
dotnet/runtime#138181 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
CO spearhead is too loudOuverteS: Untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
Les mainteneurs répondent en général sous 2 jours