Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong place of CoreArchive.run.finish event #8795

Merged
merged 2 commits into from Sep 21, 2015

Conversation

andrzejewsky
Copy link

Hi @mattab & @tsteur,

Do you remember about my latest PR which concerns the archiving lifecycle events: #8738

There is a small mistake, because the event CoreArchive.run.finish will execute only when we have some errors. In the other case it will never execute: https://github.com/andrzejewsky/piwik/blob/8d2ac648f6d222a8c4e2767b5fc4e7041bee68ea/core/CronArchive.php#L440

This event should be placed at beginning of the end() method.

*
* @param CronArchive $this
*/
Piwik::postEvent('CoreArchive.run.finish', array($this));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized those events (CoreArchive.run.start & CoreArchive.run.finish) were not placed within the run() method which is what they were supposed to be. Sorry I didn't notice they were placed in init() and end() method.

In this case we should rename CoreArchive.run.start into CoreArchive.init.start and CoreArchive.run.finish into CoreArchive.end I think?

As we haven't released a new version yet this should be no problem.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok @tsteur I have just renamed mentioned events

tsteur added a commit that referenced this pull request Sep 21, 2015
Wrong place of CoreArchive.run.finish event
@tsteur tsteur merged commit bfdced2 into matomo-org:master Sep 21, 2015
@tsteur
Copy link
Member

tsteur commented Sep 21, 2015

Thx!

@tsteur tsteur added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Sep 21, 2015
@tsteur tsteur added this to the 2.15.0 milestone Sep 21, 2015
@tsteur
Copy link
Member

tsteur commented Sep 21, 2015

Sorry I just noticed it is supposed to be CronArchive and not CoreArchive. All the other events start with CronArchive. I will rename the 2 events, sorry for that only noticed it when documenting

tsteur added a commit that referenced this pull request Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants