fix: #3637050 Stop the running time when the archive has been created

Closes https://www.drupal.org/project/earkiv/issues/3637050

What it does

  • HTTrackCommands stores archived in the progress record when the archive has been created and the job gets the status Waiting.
  • ArchiveProgress::getArchiveDuration() returns the time from the start until the archive was created.
  • A waiting job is summarised as "Archive created: …, 12 min 12 sec. Waiting for storage for 25 min 48 sec." instead of a running time that keeps growing.
  • A done job that waited at least a minute is summarised as "…, created in 12 min 12 sec, stored after 38 min"; one that was stored right away as before.
  • Jobs created before this change, without archived, are summarised as before.
  • earkiv:process says "The archive of job N is stored by the next earkiv:process." when it has created an archive.
  • The README describes the Waiting status and earkiv:create --process.

Testing

  • The summaries with the numbers of a real job: waiting, done after a wait, done right away, and an old waiting job without archived.
  • A small job that only fetched the start page showed "…, 5 sec. Waiting for storage for 12 sec." and the new message, and the next earkiv:process stored it.
  • phpcs, phpstan with the gitlab_templates configuration and the kernel test pass locally.

AI-Generated: Yes (Used Claude Code to investigate the running times, write the fix and write this merge request.)

Merge request reports

Loading
Loading