[4.1] [SOC 21] Add a Scheduled Tasks Infrastructure to Joomla#35143
Merged
bembelimen merged 670 commits intojoomla:4.1-devfrom Nov 26, 2021
Merged
[4.1] [SOC 21] Add a Scheduled Tasks Infrastructure to Joomla#35143bembelimen merged 670 commits intojoomla:4.1-devfrom
bembelimen merged 670 commits intojoomla:4.1-devfrom
Conversation
Contributor
|
Please review and correct the codestyle used in all the xml |
richard67
reviewed
Aug 15, 2021
administrator/components/com_admin/sql/updates/mysql/4.1.0-2021-08-04.sql
Outdated
Show resolved
Hide resolved
richard67
reviewed
Aug 15, 2021
administrator/components/com_admin/sql/updates/postgresql/4.1.0-2021-08-04.sql
Outdated
Show resolved
Hide resolved
Contributor
|
Looking at the language file I can see a lot of values which could be replaced with existing strings from global language files. This will reduce the workload on translators and also ensure a more consistent ui. For example COM_CRONJOBS_FIELDSET_RULES is the string used to display a fieldset called JCONFIG_PERMISSIONS_LABEL |
Contributor
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_admin/sql/updates/mysql/4.1.0-2021-08-08.sql
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_admin/sql/updates/postgresql/4.1.0-2021-08-08.sql
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/layouts/Joomla/form/field/interval.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
Contributor
|
Please ask your mentors how to format and indent the xml files. |
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Controller/CronjobsController.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Controller/DisplayController.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Cronjobs/CronOption.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Cronjobs/CronOption.php
Outdated
Show resolved
Hide resolved
PhilETaylor
reviewed
Aug 16, 2021
administrator/components/com_cronjobs/src/Cronjobs/CronOptions.php
Outdated
Show resolved
Hide resolved
Contributor
Contributor
- Scheduler::run() now uses an options array backed by the Symfony OptionsResolver. - Offers a new option that allows for execution concurrency (this was specifically required by the CLI command).
Updates Schedulerunner for changes in Scheduler::run()
- Null safety against Tasks. - More informative stderr log on lock acquisition failures. - Now allows concurrency so Web doesn't block out CLI anymore (thanks to the updates in Scheduler::run()). Refs: joomla#35143#issuecomment-976391914 / @alikon / @bembelimen
- Better (expectedly safer) flow of logic with attempts to get the logical/enumerated state from command mode and interactive modes. - Terminate on invalid command invocation. - Fix exit success message (did not show action). - Better formatting of description, etc. - Code-style fixes. Refs: joomla#35143#issuecomment-977608144 / @alikon / @bembelimen
Minor improvement to `scheduler:run` description for consistency.
- Adds state enumerations and map. - Adds basic static state and id validators. - Fix use of un-imported Text class, $->getMessage() call.
- Better validation and improved consistency. - Removes now redundant state enumerations, mapping and validators which the Task class offers.
Conflicts:
composer.lock: Restored to 'joomla-cms/4.1-dev', added dependencies
locked.
Contributor
|
Thank you @ditsuke , @brianteeman , @PhilETaylor , @richard67 , @HLeithner , @Denitz , @alikon , @dgrammatiko , @nibra , @chmst , @softforge (and many more) who made this possible and happen. |
Contributor
|
from when a pr it's merged without 2 test |
brianteeman
added a commit
to brianteeman/joomla-cms
that referenced
this pull request
Dec 21, 2021
joomla#35143: Revert "Add align-self: center to buttons for improved rendering in flex containers"
wilsonge
pushed a commit
that referenced
this pull request
Dec 21, 2021
#35143: Revert "Add align-self: center to buttons for improved rendering in flex containers"
Kostelano
added a commit
to JPathRu/localisation
that referenced
this pull request
Jan 22, 2022
joomla/joomla-cms#30522 + joomla/joomla-cms#32223 + joomla/joomla-cms#31675 + joomla/joomla-cms#35378 + joomla/joomla-cms#35612 + joomla/joomla-cms#35715 + joomla/joomla-cms#35610 + joomla/joomla-cms#35607 + joomla/joomla-cms#35788 + joomla/joomla-cms#35647 + joomla/joomla-cms#35143 + joomla/joomla-cms#36135 + joomla/joomla-cms#35998 + joomla/joomla-cms#36173 + joomla/joomla-cms#36212 + joomla/joomla-cms#36208 + joomla/joomla-cms#36206 + joomla/joomla-cms#36205 + joomla/joomla-cms#36203 + joomla/joomla-cms#36192 + joomla/joomla-cms#36191 + joomla/joomla-cms#36228 + joomla/joomla-cms#36211 + joomla/joomla-cms#36271 + joomla/joomla-cms#36270 + joomla/joomla-cms#36245 + joomla/joomla-cms#36294 + joomla/joomla-cms#36244 + joomla/joomla-cms#36242 + joomla/joomla-cms#36296 + joomla/joomla-cms#36190 + joomla/joomla-cms#36474 + joomla/joomla-cms#36297 + joomla/joomla-cms#36480 + joomla/joomla-cms#36479 + joomla/joomla-cms#36551 + joomla/joomla-cms#36366 + joomla/joomla-cms#36589 + joomla/joomla-cms#36583 + joomla/joomla-cms#36328 + joomla/joomla-cms#36515 + joomla/joomla-cms#36555 + joomla/joomla-cms#36653 + joomla/joomla-cms#36660 + joomla/joomla-cms#36657 + joomla/joomla-cms#36637 + joomla/joomla-cms#35983 + joomla/joomla-cms#36704 + joomla/joomla-cms#36708 + joomla/joomla-cms#36700 +
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Introduction
Many web hosting services do not offer access to the native UNIX cron. A popular solution to scheduling tasks with such servers is using a lazy scheduler (or, 'pseudo-cron'). Other major CMS like Drupal and WordPress already offer some form of pseudo-cron functionality.
However, there is currently no standard way to schedule tasks in the Joomla! core. There is also no way to integrate native cron with Joomla! if the server offers access to this functionality.
This PR introduces a Scheduled Tasks infrastructure to Joomla! As of the last update to this description, this infrastructure includes a Scheduler component, a system plugin to run the Scheduler on each page load implemented in the first half of my work under SOC '21. Also included is a test task plugin along with 2 functional job plugins:
Summary of Changes
onBeforeRenderevent, and registers a method to run the Scheduler as a shutdown_function. At most a single scheduled task is executed per request. The task execution is logged to thejoomla_scheduler.phplog file.#__scheduler_tasksdatabase table.com_scheduleras an#__assetsentry.#__extensionsentries forcom_scheduler,plg_system_schedulerunner,plg_task_demotasks,plg_task_requests,plg_job_sitestatus.Planned Work
Right now, the major planned milestones include:
scheduler:runscheduler:listscheduler:addscheduler:stateEnhancements and Fixes
Testing Instructions
Management Workflow
For testing, a fresh installation/config is important. Steps:
joomla_scheduler.phplog file.The log should look like this:
@todo: testing instructions for the CLI and Webcron.
Documentation Changes Required
We'll need all new documentation for the Scheduler, the Tasks infrastructure
Acknowledgements
I would like to give a special thanks to @alikon for their work on #29592. I have and continue to draw much inspiration from their ideas, many of which I've indirectly or directly used from the very nascent stages of development to now especially with the system plugin and the console commands in development.
I also owe much gratitude to my mentor @bembelimen who is always there to help me with things even at the oddest of times. A special mention also to our team lead @shivamdiehard who makes sure things go over smoothly.