Problem/Motivation

drush earkiv:process runs one step of a job per call. When the archive has been created, the job gets the status "Waiting" until the next call stores it. While the job waits, the running time in the archive list and in drush earkiv:status keeps growing, because it is calculated as the current time minus the start time until the job is done.

A job whose crawl and compression took 13 minutes showed "Archive created: 7,874 URLs, 110 broken links, 2.39 GB, 38 min 2 sec" 25 minutes later. Another job that was already waiting showed over an hour and was cancelled, since it looked as if the crawl was very slow. Nothing in the list or the Drush output says that the job only waits for the next earkiv:process.

Proposed resolution

  1. Store when the archive was created, and use that time for the running time of a waiting job, so that the time stops when the archive is ready.
  2. Show how long the job has waited for storage separately, for example "Archive created: 7,874 URLs, 110 broken links, 2.39 GB, 13 min 12 sec. Waiting for storage for 25 min."
  3. When earkiv:process has created an archive, say in the output that the next earkiv:process stores it, and mention earkiv:create --process in the README for creating and storing in one call.
  4. For a job that is done, show the time it took to create the archive and the total time including the wait, so that the crawl time can be compared between jobs.

Remaining tasks

  • Implement and test.
  • Review.

User interface changes

The archive list and earkiv:status show the time it took to create the archive and the waiting time separately.

API changes

None.

Data model changes

The progress record in the State API gets the time the archive was created.

AI-Generated: Yes (Used Claude Code to investigate the running times and draft this issue.)

Issue fork earkiv-3637050

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

thomas alsén created an issue. See original summary.

  • thomas alsén committed 5604a6b7 on 1.0.x
    fix: #3637050 Stop the running time when the archive has been created
    
thomas alsén’s picture

Status: Active » Fixed

Merged into 1.0.x!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.