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
Archiving with --force-all-websites
now shares the site list with other processes
#7682
Conversation
That allows to run a second archive process which will reuse the same (shared) site list.
|| !SharedSiteIds::isSupported()) { | ||
if (!empty($this->shouldArchiveAllSites) && SharedSiteIds::isSupported()) { | ||
$this->websites = new SharedSiteIds($websitesIds, SharedSiteIds::OPTION_ALL_WEBSITES); | ||
} elseif (!empty($this->shouldArchiveSpecifiedSites) || !SharedSiteIds::isSupported()) { |
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.
A suggestion to improve clarity (at least for this small part of CronArchive.php): could the site ID list creation logic be in a private method? ie $this->websites = $this->createSitesToArchiveQueue(...);
then instead of an if/elseif, could have several if(s) w/ return statements.
Verified that this works as expected. Once the single review comment is dealt w/, it can be merged. |
Done, moved the code to a private method |
I was hoping you'd also clear up the logic a bit. I find it a bit confusing, and since you're in there, you could do some cleaning. Eg, if the if/elseif is split up, the first |
Archiving with `--force-all-websites` now shares the site list with other processes that are run w/ `--force-all-websites`.
FYI @mgazdzik we changed the meaning of |
@mnapoli could you update the --force-all-websites param documentation to explain the ilst will be shared across multiple processes? |
@mattab done |
See #7614
Archiving with
--force-all-websites
now shares the site list. That allows to run a second archive process which will reuse the same (shared) site list.To avoid a normal archiver sharing the site list with an archiver using
--force-all-websites
, we store the shared site list in a different option.To sum up: