By Private Profile 2eff4882 on 2021-08-28 15:24 in Summer 2021 CronJobs

Tasks Accomplished

In Week 7, one of the primary goals was to collect, acknowledge and process the community feedback received after the draft PR on the parent repository.

  • Fix the XML code-style: Ironically, the XML code-style was surprisingly hard for me to get right! Maybe it could qualify as the biggest challenge of this project cause 3 iterations later and I'm still not sure if it's all good. ?
  • Fix license headers: Embarrassingly so, I got the license headers all wrong. This was discovered thanks to a review from @PhilETaylor and fixed promptly!
  • Move media-build files to the right place: Discovered thanks to @dgrammatiko, the media build files were in the /media directory instead of /build. In the process of fixing this, I also refactored the files and media registry names as they were rather awkwardly named.
  • Refactor/rebrand Cronjobs [com_cronjobs] to Scheduled Tasks [com_scheduler]: So this was a big one, but on community feedback we ascertained that the existing name and branding was first not accurate and second wouldn't appeal as much to non-technical folks as would Scheduled Tasks, or simply Schedule. I ended up doing a deep refactoring of all symbols and language strings across the component and the plugins to reflect this change, resulting in consistent Scheduler, Task, Routine references across the code-base and views.
  • Add a Scheduler and a Task class: Over the past few days, I've worked on restructuring the way we handle the scheduler and task execution to make a more robust API of sorts that can be shared by different extensions. This I felt was needed in the face of the planned console commands and API extension to minimize code duplication and have a more structured and uniform way to go about things. At the moment these classes support fetching and executing tasks, but I expect to extend them in the future so we can do C[R]UD through these classes instead of dealing directly with the models in other extensions (they make things messy where they don't belong).
  • Misc. fixes: There were a few more things to go about in cleaning everything up. There was some feedback on the Cronjob form that revealed some problems particularly with the interval inputs and task parameter which have now been addressed. I also discovered I was using deprecated directives for PHP CodeSniffer, which I updated so they could work with newer versions of the tool as they come out. Besides this, I also added long due indexes to the database table, user action logs for Task management and enhancements to the list view model.

Besides this work, I also gave a short talk on this project on the Joomla NEXT event organized by Techjoomla to celebrate 16 years of Joomla! and the release of Joomla 4.0 The talk can be accessed through this link (you can also hear my fellow SOC and GSOC student developers talk about their projects!!)