Update for Modx3#38
Conversation
add icon for menu
Remove run
add file browser for task's type as file
1.5.0 version
|
Thanks for the pull request! Some cool new features in there, too. Looks good from a code review, only spotted very minor things I would want to change. I'll try to find the time to do some proper testing with this on both 2.x and 3.x in the next few weeks. |
There was a problem hiding this comment.
Pull request overview
This PR updates Scheduler to better support MODX 3 while introducing reliability and performance improvements.
- Add MODX 3 compatibility (service container bootstrap, namespaced processors, dedicated MODX 3 build script).
- Introduce task retry logic (max_retries/retry_delay), improved failure notifications (templateable emails), and fix a run-processor race condition with atomic status updates.
- Add composite index (status, timing) for faster task selection and several UI updates (history grid retry count, icons, and settings).
Reviewed changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| core/components/scheduler/processors/mgr/runs/remove.class.php | Minor formatting; no functional changes |
| core/components/scheduler/processors/mgr/runs/multiple.class.php | Minor formatting; no functional changes |
| core/components/scheduler/processors/mgr/runs/history.class.php | Coding style cleanup; update action icon |
| core/components/scheduler/model/schema/scheduler.mysql.schema.xml | Add retry fields, composite index for sTaskRun |
| core/components/scheduler/model/scheduler/staskrun.class.php | Safer/clearer timing rounding and parsing |
| core/components/scheduler/model/scheduler/stask.class.php | Retry handling, Throwable catching, templateable failure emails |
| core/components/scheduler/model/scheduler/sprocessortask.class.php | MODX 3 namespaced processors support and path resolution |
| core/components/scheduler/model/scheduler/mysql/staskrun.map.inc.php | Map retry_count and status_timing index |
| core/components/scheduler/model/scheduler/mysql/stask.map.inc.php | Map max_retries and retry_delay |
| core/components/scheduler/lexicon/ru/default.inc.php | New settings/labels for retries and email templating (RU) |
| core/components/scheduler/lexicon/en/default.inc.php | New settings/labels (EN); minor text edit |
| core/components/scheduler/index.class.php | MODX 2/3 initialization; JS includes formatting |
| core/components/scheduler/docs/changelog.txt | New 1.7.0 section and reworked chronology/content |
| core/components/scheduler/controllers/index.class.php | Minor formatting |
| core/components/scheduler/bootstrap.php | MODX 3 service bootstrap (registers scheduler service) |
| assets/components/scheduler/run.php | Atomic status update to prevent race condition; timing/cleanup |
| assets/components/scheduler/js/mgr/widgets/windows.tasks.js | UI updates incl. retry fields; minor cleanups |
| assets/components/scheduler/js/mgr/widgets/grid.history.js | History grid columns (retry_count), actions, and refactors |
| assets/components/scheduler/js/mgr/misc/scheduler.utils.js | Minor whitespace cleanup |
| assets/components/scheduler/js/mgr/combos.js | Style cleanup; no functional changes |
| assets/components/scheduler/css/bootstrap.buttons.css | Formatting |
| _build/validators/requirements.script.php | Version checks updated; MODX 2/3 compatibility |
| _build/resolvers/resolve.tables.php | Table create/remove with MODX 2/3 compatibility |
| _build/resolvers/resolve.dbchanges.php | Upgrades include retry fields and composite index |
| _build/data/transport.menu.php | Menu icon updated (font icon) |
| _build/data/settings.php | New settings: email template/subject, tasks_per_run |
| _build/build.transport.php | Bump version to 1.7.0 |
| _build/build.transport.modx3.php | New MODX 3 build script |
| _build/build.schema.modx3.php | New MODX 3 schema build helper |
| _bootstrap/index.php | Path handling cleanup |
Comments suppressed due to low confidence (1)
assets/components/scheduler/js/mgr/widgets/grid.history.js:302
- This property is overwritten by another property in the same object literal.
, removeRun: function (btn, e) {
const ids = this._getSelectedIds();
if (!ids.length) {
return false;
}
Ext.MessageBox.confirm(
_('ms2_menu_remove_title'),
ids.length > 1
? _('scheduler.run_multiple_remove_confirm')
: _('scheduler.run_remove_confirm'),
function (val) {
if (val === 'yes') {
this.runAction('remove');
}
}, this
);
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| if (!/^\//.test(config.openTo)) { | ||
| config.openTo = '/' + config.openTo | ||
| } | ||
| if (!/$\//.test(config.openTo)) { |
There was a problem hiding this comment.
This assertion can never match.
| if (!/$\//.test(config.openTo)) { | |
| if (!/\/$/.test(config.openTo)) { |
|
(You don't have to do anything with the copilot review, I'll check it out.) |
No description provided.