Skip to content

[Improvement]: Log how long each maintenance task ran #397

Description

@cancan101

Improvement description

Pimcore\Maintenance\Executor logs when a task starts and when it finishes, but not how long it took:

Starting job with ID pimcore_maintenance_cleanup_versions
Finished job with ID pimcore_maintenance_cleanup_versions

The maintenance run is a sequence of tasks contributed by core and by every installed bundle, so when the nightly run starts overrunning its window there is nothing in the log that says which task grew. Answering that today means adding instrumentation to the executor by hand.

Including the elapsed time in the finished message — and in the failure message, since a task that fails after 40 minutes and one that fails immediately are different problems — makes the run self-diagnosing at no cost.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Affected capability

    None yet

    Platform Version

    None yet

    Galaxy

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions