Skip to content

#280 print start/finish timestamps for job progress - #280

Open
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:280-progress-stdout
Open

#280 print start/finish timestamps for job progress#280
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:280-progress-stdout

Conversation

@VasilevNStas

Copy link
Copy Markdown
Contributor

baza.rb polls finished? without any indication of whether the job actually started or how long it's been running. The user sees only "waiting..." until the polling timeout.

What this PR does

Adds ISO 8601 timestamps around judges update:

Job 79196 started at 2026-06-29T20:15:30Z
... (judges output) ...
Job 79196 finished at 2026-06-29T20:16:45Z

What this enables

Scenario Before After
Job starts No signal "started at ..." visible in stdout
Job completes Only judges output "started at ..." + "finished at ..."
Job crashes Nothing, baza.rb hangs "started at ..." only — signals abnormal exit

If judges update fails (non-zero exit), set -e means only the start timestamp is printed — which itself signals that the job started but didn't complete normally.

Checklist

  • bundle exec rubocop — 0 offences
  • bundle exec rake — all tasks pass
  • HoC ≤ 133

@yegor256 please review

baza.rb polls finished? without any indication of whether the job
actually started or how long it's been running. Print ISO 8601
timestamps before and after judges update, giving baza.rb and
operators wall-clock progress information.

If judges fails (non-zero exit), only the start timestamp is
printed, which itself signals that the job started but didn't
complete normally.
@VasilevNStas
VasilevNStas requested a review from yegor256 as a code owner June 29, 2026 17:20
@VasilevNStas

Copy link
Copy Markdown
Contributor Author

Why this matters

baza.rb polls finished? with a timeout. When the timeout expires, it has no way to tell whether:

  • the job never started (config error)
  • the job is still running (slow judges)
  • the job crashed silently (no stdout at all)

After this PR, every job produces:

Job 79196 started at 2026-06-29T20:15:30Z
... judges output ...
Job 79196 finished at 2026-06-29T20:16:45Z

The key insight: if you see started but no finished, you know the job crashed. If you see neither, you know it never started. This turns a blind timeout into actionable diagnostics with zero added complexity.

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.

1 participant