Needs work
Project:
Ultimate Cron
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2019 at 15:41 UTC
Updated:
7 Apr 2026 at 07:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
nortmas commentedHere is the patch.
Comment #3
nortmas commentedSorry this one should be correct
Comment #4
nortmas commentedComment #5
jayelless commentedNote that there is a module ultimate_cron_views that exposes the cron job logs to views to allow for additional reporting.
Comment #6
murzCurrent hard-coded limit of 10 entries to show is very confusing! Especially with available settings for logger cleanup method in Ultimate Cron UI. When users see only 10 records, they think, that limits are not applied!
And provided patch solves this problem, thanks for patch! Will be also good to expose
1000limit to some settings form, but this is not so necessary.Can anybody apply this patch to module core?
Comment #7
codebymikey commentedThe current patch probably shouldn't land in the module as it's inefficient to load 1000 entries when only a subset is actually shown on the page.
Drupal has a built-in
EntityListBuilderwhich should help with loading content like this in an efficient manner. So the logger controller can reimplement similar pagination logic as done within that class (as I don't think the logs are actually entities and just raw entries fetched from a backend).Given that there could be different logger implementations, we'd probably need to introduce a new interface method for whether the logger actually supports pagination or not. If it doesn't, then we can keep the default behaviour of only showing 10-50 or introduce a configuration for how many to show by default.
Comment #9
codebymikey commentedThe
DatabaseLoggerlogger already implements thePagerSelectExtenderclass, so needs to be excluded.Ideally each logger should implement an interface which states whether they support pagination or not, but in order to keep the feature patch lightweight and avoid any conflicts, it's been implemented this way.
Comment #10
codebymikey commentedThe
DatabaseLoggerlogger already implements thePagerSelectExtenderclass, so needs to be excluded.Ideally each logger should implement an interface which states whether they support pagination or not, but in order to keep the feature patch lightweight and avoid any conflicts, it's been implemented this way.
Comment #11
prudloff commentedAdded a comment on the MR.
Comment #12
prudloff commentedComment #13
arousseau commentedThe MR works great using the database logger.
I'm unsure about the 1000 item count when the logger does not support pagination though.
Is it ok to leave as is, or should it be lowered to something more reasonable ?
Comment #14
solideogloria commentedI think 50 or 100 would be more reasonable. 1000 seems too high. I would probably choose 50, as that's the number of rows displayed in /admin/people or other similar screens.
Comment #16
dieterholvoet commentedChanged to 50
Comment #17
berdir50 seems fine. Quite a bit of code duplication and hardcoded checks on the database plugin isn't nice.
Once again, I think that the module is currently too extensible/pluggable which increases complexity but results in limited benefits. Maybe this should just be an interface and a service and we design it so that another implementation would need to handle this itself. But lets focus on a stable release and refactor this later.
Comment #18
dieterholvoet commented