Closed (fixed)
Project:
Webform Purge
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2018 at 12:04 UTC
Updated:
10 Jun 2020 at 07:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hctomHere is a patch that enables the cron limit functionality.
CAUTION: This patch only applies when patch from #2937269-6: Cannot load admin form because of incorrect query is applied first!
Comment #3
jeroentHow does this work in combination with the "webform_purge_run_once" setting?
Comment #4
hctomIt should work as normal, because the "run once" setting only limits the number of runs per day, but not the number of records to check/delete.
Comment #5
yogeshmpawarComment #6
yogeshmpawar@hctom, currently you patch failed to apply on 7.x-1.x branch & while setting the "Maximum number of purged submissions" with your patch "webform_purge_cron_limit" value not set after form submit. so i have added form_submit in my patch to overcome this problem. Also i have reduced the "limit the number of purged submissions" from "100000" to "50000" because when we run for a "100000" cron fails because of memory allocations issue. so i reduced this size for maximum number of purged submissions.
Please feel free to review my patch.
Comment #7
hctom@yogeshmpawar sorry for the late reply, but here is my feedback:
system_settings_form()wrapper function, so there shouldn't be a custom form submit handler to be necessary - did you try the module with my patch on a clean Drupal install? I guess it will work there and in there is something else interfering in your project. Also, in our project's the value saving is working perfectly without the need of another submit handler... and last but not least the most important thing: Please always provide an interdiff (see https://www.drupal.org/documentation/git/interdiff) for a new patch outlining the changes between the old and the new patch. Otherwise it is almost impossible to see what changed in your patch.
Therefore I will hide your patch file for now, but feel free to provide a new/improved one with all my feedback applied.
Comment #8
stborchertRe-roll of patch in comment #2 against latest dev.
Comment #9
jeroentI would suggest adding a “no limit” option and an update hook that sets the default value to that “no limit” option so the module keeps working as before for users that don’t need the limit option.
Comment #11
jeroentCommitted and pushed to 7.x-1.x. Thanks!