Now that logging is enabled, the logic to autodiscover all system monitors and their active associated tasks is needed to actually get this module working.
The logic should:
- Use the Symfony plugin system to find all declared system monitors
- Use the tasks and monitors that are currently active in the system (based on configuration)
- Allow running these tasks all at once or on a monitor-by-monitor basis
- Allow running tasks by task group (picked up from the annotations on the plugin)
These options will tie in with drush commands that are already outlined in other issues already in the queue.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | interdiff--3087826--11-13.txt | 2.63 KB | merauluka |
| #13 | system_monitor--3087826--build-task-runner--13.patch | 41.68 KB | merauluka |
Comments
Comment #2
merauluka commentedWork has begun on this feature.
Track progress here:
https://git.drupalcode.org/project/system_monitor/compare/8.x-1.x...task...
Comment #3
merauluka commentedHere's a first look at this feature. Setting this to Needs Review to kick off tests.
Comment #4
merauluka commentedComment #5
merauluka commentedRetrying with fixes to dependency ordering in services file.
Comment #6
merauluka commentedFixing schema issue.
Comment #7
merauluka commentedFixing broken tests.
Comment #8
robpowellA few code sniffs fixes. Here is the gitlab branch compare,
https://git.drupalcode.org/project/system_monitor/compare/8.x-1.x...task...
Comment #9
robpowellWhat's going on here, why do we have to pass the class name as string?
SystemMonitorTaskManager::__construct()
Comment #10
merauluka commented@robpowell This is a common practice when extending DefaultPluginManager. See core for examples.
Comment #11
merauluka commentedHere's another update. I missed adding this to the actual hook_cron function so it would actually attempt to run on cron.
Whoops!
Comment #12
damienmckennaNice work!
I don't think the em tag is necessary here.
The correct docblock syntax is
@todowithout the colon.If getAvailableTasksByMonitorId() always returns an array you could skip the if(!empty()) and just go straight to foreach($this->systemMonitorUtility->getAvailableTasksByMonitorId($monitor)), though that is a little long for a single line. :shrug: :)
General notes:
You should demo this at the next dev team meeting :-)
Comment #13
merauluka commentedMade a few updates based on @dmkenna's recommendations.
I did leave the
<em>tags because I wanted to add emphasis on that portion of the field description.Regarding the parameter descriptions, we're going to perform a final sweep of the module prior to cutting a stable tag that will encompass these sorts of clean up efforts (adding more comments, parameter descriptions, additional tests where needed).
Comment #15
merauluka commentedSince this issue was more about code review than actually testing functionality, and since this module is still under heavy development, I'm merging this and marking this issue as "Fixed".
Thanks everyone!