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
Add segment_last_edit_time option value for [General] process_new_segments_from INI config #8615
Conversation
…nt_last_edit_time'. New option sets beginning of segments archiving from last edit time (or created time if it is found). Includes tests.
CC @quba |
$this->logger->debug("process_new_segments_from set to segment_last_edit_time, segment last edit time is {time}", | ||
array('time' => $segmentLastEditedTime)); | ||
|
||
if ($segmentLastEditedTime === null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe off topic but when we create a segment, do we set edited time = created time? This would avoid having to do this check and I think it's usually common to do this. But we'd need an update script then to fix missing values :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually thought we did and was just being extra careful (didn't want to slow core:archive down if somehow the field was null (maybe due to a plugin)), but it turns out we don't initialize it to the created time... more strangeness in the world of Piwik core.
I don't think it's necessary to change this for 2.15, but it seems obvious to me that the last edit time should be initialized to the created time. If you agree, I'll create an issue for 3.0.
Looks good to me, added a comment but more like optional |
…getCreatedTimeOfSegment() to include latest edit time.
Manual tests went ok, will merge. @tsteur If there are any other issues, feel free to bring them up, I can make changes after merging. |
Fixes #8607, add segment_last_edit_time option value for [General] process_new_segments_from INI config
Add new option for [General] process_new_segments_from option, 'segment_last_edit_time'. New option sets beginning of segments archiving from last edit time (or created time if it is found). Includes tests.
Refs #8607
TODO: