-
Notifications
You must be signed in to change notification settings - Fork 15
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
Rewrite of batch.inc and added Drush command #39
base: 7.x
Are you sure you want to change the base?
Conversation
@janjouketjalsma I definitely like the direction this is going in w/r/t better labeling (saying explicitly that the batch limit only applies to cron jobs, more descriptive variable names, etc) but I think we may be able to go a step further with the admin menu title and description, specifically in terms of the phrase
Though this makes perfect sense to us as Drupal developers and it isn't at all incorrect, I wonder if we could find a more friendly and succinct description? For instance "...when running via My vote would be for the second phrasing ( I haven't investigated the rest of the code changes though so do not mistake this for a code review :) |
@bryjbrown I agree. We should definitely find a better name things that go to the frontend. Also in the backend I'm open to suggestions. I'm not particularly fond of max_chunk_size for instance. I'll wait for some more feedback before I update the PR. |
@bryjbrown just if you have some time: any feedback/ideas we could give @janjouketjalsma for wording things (like the |
@@ -34,13 +34,22 @@ function islandora_xmlsitemap_admin_form($form, &$form_state) { | |||
'#description' => t('Solr field in which we can perform sorting and range queries.'), | |||
'#default_value' => variable_get('islandora_xmlsitemap_last_modified_field', 'fgs_lastModifiedDate_dt'), | |||
); | |||
$form['islandora_xmlsitemap_number_of_pids_to_process'] = array( | |||
$form['islandora_xmlsitemap_generate_limit_cron'] = array( |
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.
@janjouketjalsma If you are going to change this variable name, you should add a hook_update_N()
function to migrate the old setting from islandora_xmlsitemap_number_of_pids_to_process
to islandora_xmlsitemap_generate_limit_cron
and then unset the islandora_xmlsitemap_number_of_pids_to_process
variable. Otherwise it will hang around forever.
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.
Once again, the old refrain, "Don't forget the uninstall hook!"
islandora_xmlsitemap_uninstall() - the variable name should be updated there too.
Additionally @janjouketjalsma you might want to run this through |
@DiegoPino @janjouketjalsma Having taken a break from this for a while and coming back to re-read with fresh eyes, I think the only specific wording I would change is the "title" on the One thing that I would like to see in the wording for both the |
@janjouketjalsma I'd add @whikloj comment. I'd suggest a more detailed command Recap: This is waiting on the following? Is this correct?
I assumed this stalled because of a release. Any reason we can't get this one back on track? My interest in pushing this forward is a ticket I took on that requires the generation of a new file this PR has already created. It would make completing ISLANDORA-2275 easier if this PR is completed. |
@DonRichards I don't think this stalled because of the release, I think it stalled because this PR is owned by @janjouketjalsma and we haven't heard from him. If anyone else wanted to add to this PR specifically, they'd have to make a PR against his fork I think. As for your assessement of what needs to be done, I'd say you are correct with the slight correction that the update and uninstall hooks are for handling the renamed variable ( If you would like to fix these things in a PR against @janjouketjalsma's fork, that might ease the process if @janjouketjalsma can't get to this before the code freeze. |
You are correct, I'm afraid. I am in the middle of a job switch so this PR
is not getting full attention.
…On Wed, 12 Sep 2018, 23:50 Bryan J. Brown, ***@***.***> wrote:
@DonRichards <https://github.com/DonRichards> I don't think this stalled
because of the release, I think it stalled because this PR is owned by
@janjouketjalsma <https://github.com/janjouketjalsma> and we haven't
heard from him. If anyone else wanted to add to this PR specifically,
they'd have to make a PR against his fork I think.
As for your assessement of what needs to be done, I'd say you are correct
with the slight correction that the update and uninstall hooks are for
handling the renamed variable (
islandora_xmlsitemap_number_of_pids_to_process to
islandora_xmlsitemap_generate_limit_cron) instead of any functions.
If you would like to fix these things in a PR against @janjouketjalsma
<https://github.com/janjouketjalsma>'s fork, that might ease the process
if @janjouketjalsma <https://github.com/janjouketjalsma> can't get to
this before the code freeze.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWRCQJmf-Qg6UAAv5r8ek-MBOOB0BXKks5uaYGygaJpZM4SAFkg>
.
|
@janjouketjalsma No worries, if we were to finish this up by making a PR against https://github.com/LeidenUniversityLibrary/islandora_xmlsitemap, could we count on you to merge it in so it would show up here and we could wrap this thang up? |
Thanks for understanding! Just give me a sign. I will make sure it gets
merged.
…On Thu, 13 Sep 2018, 18:12 Bryan J. Brown, ***@***.***> wrote:
@janjouketjalsma <https://github.com/janjouketjalsma> No worries, if we
were to finish this up by making a PR against
https://github.com/LeidenUniversityLibrary/islandora_xmlsitemap, could we
count on you to merge it in so it would show up here and we could wrap this
thang up?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWRCfblXGba-pxgTTmpTgX-nLdym75dks5uaoPbgaJpZM4SAFkg>
.
|
Hello, has this pull request been abandoned? I am encountering an issue with a site that has over 2 million objects and think this would help @janjouketjalsma |
JIRA Ticket: NA
What does this Pull Request do?
Improve (if you ask me) the code of batch.inc and adds a Drush command.
What's new?
A summary of the changes can be found below
New
Changes to form
hook_cron()
.Also renamed this field internally to
islandora_xmlsitemap_generate_limit_cron
.hook_cron()
and the regenerate buttons to determine how many Objects to process every time the operation is called.Changes to batch code
This fixed our biggest issue as we would have crashes when trying to process a million records at which point the progress was not saved and we had to start over.
$sandbox['finished']
to 1 if an error occurs or we do not get results. This prevents more iterations from starting in case of an errorChanges to islandora_xmlsitemap_cron():
hook_cron()
is called.How should this be tested?
Additional Notes:
Interested parties
@Islandora/7-x-1-x-committers