"Total elapsed time" in the JOB DONE line is ~1.79 billion seconds (perf_counter overwrites the time.time() start)

Open
#355 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@tino097 is already working on this.

Since Oct 28, 2026.

  • #357 by @tino097 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python

Research direction

Read pipeline_core.py, jobs/stages/download.py, and the elapsed-time logging in local_runner._log_done and prefect_flow.py. Trace how timer_start is initialized and then reassigned, and check the reported duration on both runner paths. Done means successful jobs report a duration close to their actual runtime, including the Prefect duration_seconds value.

Written by the indexing model from the issue text.

Description

Every successful job on main ef6b6a4 ends with:

DATAPUSHER+ v3.0.0a0 JOB DONE! Total elapsed time: 1,792,617,918.06 seconds.

for a job that took about two seconds.

Cause: pipeline_core.py initialises the context with timer_start=time.time(), but DownloadStage.process (jobs/stages/download.py) reassigns context.timer_start = time.perf_counter() to measure the fetch and never restores it. perf_counter() is a small monotonic value, so the final time.time() - runtime.timer_start in local_runner._log_done (and the equivalent lines in prefect_flow.py, including duration_seconds reported to Prefect) is roughly the Unix epoch.

Suggested fix: give the download stage its own local start variable (or a separate fetch_start field on the context) and leave timer_start untouched.

Observed with prefect_enabled = false on CKAN 2.13.0a0; the same subtraction is used on the Prefect path.

Dominant language
Python
Stars
47
Forks
33
Avg merge
2h 28m
Merged PRs (30d)
10

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dathere/datapusher-plus

All issues in dathere/datapusher-plus

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.