• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / cronn / 17215620939
75%

Build:
DEFAULT BRANCH: master
Ran 25 Aug 2025 05:12PM UTC
Jobs 1
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Aug 2025 05:10PM UTC coverage: 72.683% (+0.09%) from 72.592%
17215620939

push

github

web-flow
fix: resolve web parser reuse and SQLite locking issues (#44)

* fix: resolve web parser reuse and SQLite locking issues

Two critical issues fixed:

1. Web UI parser reuse:
   - Web server was creating new crontab parsers on every sync instead of reusing the centralized parser from main
   - Introduced JobsProvider interface in web package (consumer-side pattern)
   - Web server now accepts parser dependency via constructor
   - Prevents resource waste and ensures consistent parser behavior

2. SQLite database locking:
   - Fixed "database is locked (SQLITE_BUSY)" errors under concurrent access
   - Added RWMutex to SQLiteStore for serialized database operations
   - Protected all DB operations (LoadJobs, SaveJobs, RecordExecution, Close)
   - Added PRAGMA busy_timeout=5000 for additional resilience

Changes:
- Added JobsProvider interface to web package with proper documentation
- Modified web.Server to use injected JobsProvider instead of creating parsers
- Added mutex-based concurrency control to SQLite operations
- Enhanced error messages with more context
- Added comprehensive test coverage for error scenarios
- Updated all tests to provide JobsProvider dependency

* refactor: extract pragma execution helper to reduce code duplication

As suggested in PR review, extracted the duplicate error handling logic
for PRAGMA execution into a helper closure within NewSQLiteStore.
This makes the code cleaner and more maintainable.

37 of 49 new or added lines in 3 files covered. (75.51%)

3 existing lines in 2 files now uncovered.

1921 of 2643 relevant lines covered (72.68%)

23.72 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
37.08
0.0% app/main.go
3
86.18
0.74% app/web/persistence/sqlite.go
8
91.01
-0.27% app/web/web.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
86.18
0.74% app/web/persistence/sqlite.go
2
91.01
-0.27% app/web/web.go
Jobs
ID Job ID Ran Files Coverage
1 17215620939.1 25 Aug 2025 05:12PM UTC 21
72.68
GitHub Action Run
Source Files on build 17215620939
  • Tree
  • List 21
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • bfc1bcfb on github
  • Prev Build on master (#17202940472)
  • Next Build on master (#17215921279)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc