-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.1] [SOC 21] Add a Scheduled Tasks Infrastructure to Joomla #35143
Conversation
Please review and correct the codestyle used in all the xml |
administrator/components/com_admin/sql/updates/mysql/4.1.0-2021-08-04.sql
Outdated
Show resolved
Hide resolved
administrator/components/com_admin/sql/updates/postgresql/4.1.0-2021-08-04.sql
Outdated
Show resolved
Hide resolved
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 |
administrator/components/com_admin/sql/updates/mysql/4.1.0-2021-08-08.sql
Outdated
Show resolved
Hide resolved
administrator/components/com_admin/sql/updates/postgresql/4.1.0-2021-08-08.sql
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/layouts/Joomla/form/field/interval.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
Please ask your mentors how to format and indent the xml files. |
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Controller/CronjobController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Controller/CronjobsController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Controller/DisplayController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Cronjobs/CronOption.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Cronjobs/CronOption.php
Outdated
Show resolved
Hide resolved
administrator/components/com_cronjobs/src/Cronjobs/CronOptions.php
Outdated
Show resolved
Hide resolved
- 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.
Thank you @ditsuke , @brianteeman , @PhilETaylor , @richard67 , @HLeithner , @Denitz , @alikon , @dgrammatiko , @nibra , @chmst , @softforge (and many more) who made this possible and happen. |
from when a pr it's merged without 2 test |
joomla#35143: Revert "Add align-self: center to buttons for improved rendering in flex containers"
#35143: Revert "Add align-self: center to buttons for improved rendering in flex containers"
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 +
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
onBeforeRender
event, 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.php
log file.#__scheduler_tasks
database table.com_scheduler
as an#__assets
entry.#__extensions
entries forcom_scheduler
,plg_system_schedulerunner
,plg_task_demotasks
,plg_task_requests
,plg_job_sitestatus
.Planned Work
Right now, the major planned milestones include:
scheduler:run
scheduler:list
scheduler:add
scheduler:state
Enhancements and Fixes
Testing Instructions
Management Workflow
For testing, a fresh installation/config is important. Steps:
joomla_scheduler.php
log 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.