Skip to content

CLI Archiver should not launch daily and weekly/monthly/yearly archiving at the same time #12718

@tsteur

Description

@tsteur

This may happen for segments when you for example launch two archivers via the CLI.

console climulti:request -q --superuser module=API&method=API.get&idSite=1&period=day&date=last52&format=php&segment=visitorType%3D%3Dnew&trigger=archivephp
console climulti:request -q --superuser module=API&method=API.get&idSite=1&period=week&date=last2&format=php&segment=visitorType%3D%3Dnew&trigger=archivephp

The problem is, that the weekly archive requires the daily archive and this could potentially result in missing data or in additional work as they weekly archive may archive the days as well.

In #12702 we have already added a command to check whether another CLI command is already running to not process twice at the same time the same archive. However, in this case it wouldn't work directly because the period, and the date is different.

So when archiving week, we would need to check for example if day/last52 is already running, before archiving month, we would need to check also additionally for week/last260 etc...

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: PerformanceFor when we could improve the performance / speed of Matomo.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions