Skip to content

[-] fix task duration calculation logic#790

Open
0xgouda wants to merge 1 commit into
masterfrom
fix-duration-calculation
Open

[-] fix task duration calculation logic#790
0xgouda wants to merge 1 commit into
masterfrom
fix-duration-calculation

Conversation

@0xgouda

@0xgouda 0xgouda commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
  • Add task.MarkStart() and task.MarkDone() methods to update the task's StartedAt and Duration fields, invoking them respectively before and after each call to the execution functions.

  • The previous code computed task.Duration only after logging had occurred, so its value was still zero at the moment of logging. Consequently, clock_timestamp() - $5::interval always evaulated to clock_timestamp(), causing the last_run and finished fields to be identical.

Closes #788

@0xgouda 0xgouda requested a review from pashagolub July 13, 2026 13:04
@0xgouda 0xgouda self-assigned this Jul 13, 2026
@0xgouda 0xgouda added the bug Something isn't working label Jul 13, 2026
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 29252344674

Coverage increased (+0.2%) to 89.796%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: 16 of 16 lines across 4 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 2303
Covered Lines: 2068
Line Coverage: 89.8%
Coverage Strength: 1.02 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with last_run and finished timing difference in the timetable.execution_log table

2 participants