Skip to content

Add local SQLite sample - #193

Merged
viceroypenguin merged 4 commits into
mainfrom
sqlite-sample
Sep 30, 2026
Merged

viceroypenguin merged 4 commits into
mainfrom
sqlite-sample

Conversation

@dukesteen

Copy link
Copy Markdown
Contributor

Summary

  • Adds samples/Sqlite: a single ASP.NET Core app that stores Immediate.Jobs state in a local SQLite file (immediate-jobs.db) through the EF Core provider, in single-server mode. It needs no containers, Aspire, or external database.
  • Endpoints: POST /greetings/{name} (enqueue), POST /greetings/{name}/delayed (runs in one minute), POST /retry-demo (fails twice with a 10s fixed backoff, then succeeds), and GET /health. A recurring heartbeat job runs every minute, and the dashboard is at /jobs.
  • EF Core SQL command logging is turned down to Warning so the console shows job activity rather than every query.
  • The database files are git-ignored. The sample readme notes that EnsureCreatedAsync doesn't update an existing database, so the file must be deleted after schema changes.
  • Adds the project to Immediate.Jobs.slnx and links it from the root readme.

The project is named SqliteSample rather than Sqlite, because a project named Sqlite makes NuGet report a dependency cycle with the SQLite package that EF Core pulls in.

Testing

  • dotnet build Immediate.Jobs.slnx: 0 warnings, 0 errors (net8.0, net10.0, net11.0).
  • Ran the sample on net10.0:
    • A greeting ran. The retry demo failed attempts 1 and 2 and succeeded on attempt 3. The heartbeat fired on the minute, and the delayed greeting ran after one minute.
    • I scheduled a delayed greeting, stopped the app while it was still pending in SQLite, and restarted it. The job then ran.
    • With the launch profile, /jobs loads, /health returns Healthy, and /jobs/api/servers reports the node.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 9b818abd-2765-4ce2-a42b-ca581bd9beb1

📥 Commits

Reviewing files that changed from the base of the PR and between 3c07b3d and 504542f.

📒 Files selected for processing (14)
  • Immediate.Jobs.slnx
  • readme.md
  • samples/Sqlite/.gitignore
  • samples/Sqlite/Jobs/ContinuationBranchDemoJobs.cs
  • samples/Sqlite/Jobs/FairQueueDemoJob.cs
  • samples/Sqlite/Jobs/GameReleaseJobs.cs
  • samples/Sqlite/Jobs/OrderFulfillmentJobs.cs
  • samples/Sqlite/Program.cs
  • samples/Sqlite/Properties/launchSettings.json
  • samples/Sqlite/SqliteSample.csproj
  • samples/Sqlite/Workflows/GameReleaseWorkflow.cs
  • samples/Sqlite/Workflows/OrderFulfillmentWorkflow.cs
  • samples/Sqlite/appsettings.json
  • samples/Sqlite/readme.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coveralls

coveralls commented Sep 30, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 36742552910

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.09%) to 89.045%

Details

  • Coverage increased (+0.09%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13410
Covered Lines: 11941
Line Coverage: 89.05%
Coverage Strength: 2.88 hits per line

💛 - Coveralls

A single-project sample that stores jobs in a local SQLite file through
the EF Core provider, with no containers or external services.
@viceroypenguin
viceroypenguin merged commit 84db2bf into main Sep 30, 2026
2 checks passed
@viceroypenguin
viceroypenguin deleted the sqlite-sample branch September 30, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants