Details
Description
- Add a new optional feature for modules to support an automation method that may be called at a given interval by Blesta cron
- Allow Input errors to be set? And if they are, include them in the cron log? Or simply assume the module will write errors to monolog?
- Add a new core cron task to call the automation method on all installed modules
Things to consider:
- Modules are much similar to plugins now, and differentiating them while merging similar features may require refactoring (something to do in a major release)
- Modules need database access. Loading the Record component may not suffice, and an instance of it may need to be provided instead
- Logging mechanisms may need to be provided to the module and its automation task
- Backward compatibility must be maintained
- Modules may need more flexibility with automation tasks, such as better support for running multiple tasks, or knowledge of the last time a particular task was last run (like a normal cron task). It would not have this information unless it creates database tables and maintains it itself.
- It may need to integrate similar install/upgrade/uninstall functionality as plugins
TODO:
- Update Modules to support a new method, cron($key), similar to plugins. Default to do nothing
- Refactor CronTasks and the `plugin_dir` column to support modules
- Add a `type` column, ENUM(system, plugin, module), default system, after `key`
- Rename the `plugin_dir` column to `dir`.
- Update the unique index for (`key`, `plugin_dir`) to (`key`, `type`, `dir`)
- Update for backward compatibility
- Update all returned objects to contain a 'plugin_dir' column. If `type` is 'plugin' then set 'plugin_dir' to the value of 'dir', otherwise null. TEST
- Update existing CronTasks methods and queries that use 'plugin_dir' to continue to work as before. TEST
- Add any new methods necessary to implement the same functionality on the new structure. Deprecate existing methods accordingly. TEST
- Update all core system calls to CronTasks to use the new methods. TEST
- (Create new tasks for each core plugin that uses cron tasks to update them accordingly)
- Add a new task when the cron runs for running module tasks, similar to plugin cron tasks. TEST
Consider allowing modules to create their own automation tasks. Such automation tasks could call methods within the module that registers the automation task to perform some action.
Or, maybe this could be abstracted such that there is a built in module automation task that calls such methods within each module on a regular basis so the module can perform such actions if it desires.
Requires some discussion
Activity
Paul Phillips
created issue -
Tyson Phillips (Inactive)
made changes -
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
Tyson Phillips (Inactive)
made changes -
Description |
Consider allowing modules to create their own automation tasks. Such automation tasks could call methods within the module that registers the automation task to perform some action.
Or, maybe this could be abstracted such that there is a built in module automation task that calls such methods within each module on a regular basis so the module can perform such actions if it desires. Requires some discussion See https://www.blesta.com/forums/index.php?/topic/4032-allow-modules-to-add-cron-tasks/&tab=comments#comment-54670 |
# Add a new optional feature for modules to support an automation method that may be called at a given interval by Blesta cron
#* Allow Input errors to be set? And if they are, include them in the cron log? Or simply assume the module will write errors to monolog? # Add a new core cron task to call the automation method on all installed modules Things to consider: # Modules are much similar to plugins now, and differentiating them while merging similar features may require refactoring (something to do in a major release) # Modules need database access. Loading the Record component may not suffice, and an instance of it may need to be provided instead # Logging mechanisms may need to be provided to the module and its automation task # Backward compatibility must be maintained # Modules may need more flexibility with automation tasks, such as better support for running multiple tasks, or knowledge of the last time a particular task was last run (like a normal cron task). It would not have this information unless it creates database tables and maintains it itself. #* It may need to integrate similar install/upgrade/uninstall functionality as plugins ---- Consider allowing modules to create their own automation tasks. Such automation tasks could call methods within the module that registers the automation task to perform some action. Or, maybe this could be abstracted such that there is a built in module automation task that calls such methods within each module on a regular basis so the module can perform such actions if it desires. Requires some discussion See https://www.blesta.com/forums/index.php?/topic/4032-allow-modules-to-add-cron-tasks/&tab=comments#comment-54670 |
Tyson Phillips (Inactive)
made changes -
Fix Version/s | 4.3.0 [ 11022 ] | |
Fix Version/s | Short Term [ 10800 ] |
Tyson Phillips (Inactive)
made changes -
Assignee | Tyson Phillips [ tyson ] |
Tyson Phillips (Inactive)
made changes -
Story Points | 8 |
Tyson Phillips (Inactive)
made changes -
Sprint | 4.3.0 Sprint 5 [ 55 ] |
Tyson Phillips (Inactive)
made changes -
Rank | Ranked higher |
Tyson Phillips (Inactive)
made changes -
Fix Version/s | 4.3.0-b1 [ 11019 ] | |
Fix Version/s | 4.3.0 [ 11022 ] |
Tyson Phillips (Inactive)
made changes -
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 41 minutes [ 2460 ] | |
Worklog Id | 10833 [ 10833 ] |
Tyson Phillips (Inactive)
made changes -
Description |
# Add a new optional feature for modules to support an automation method that may be called at a given interval by Blesta cron
#* Allow Input errors to be set? And if they are, include them in the cron log? Or simply assume the module will write errors to monolog? # Add a new core cron task to call the automation method on all installed modules Things to consider: # Modules are much similar to plugins now, and differentiating them while merging similar features may require refactoring (something to do in a major release) # Modules need database access. Loading the Record component may not suffice, and an instance of it may need to be provided instead # Logging mechanisms may need to be provided to the module and its automation task # Backward compatibility must be maintained # Modules may need more flexibility with automation tasks, such as better support for running multiple tasks, or knowledge of the last time a particular task was last run (like a normal cron task). It would not have this information unless it creates database tables and maintains it itself. #* It may need to integrate similar install/upgrade/uninstall functionality as plugins ---- Consider allowing modules to create their own automation tasks. Such automation tasks could call methods within the module that registers the automation task to perform some action. Or, maybe this could be abstracted such that there is a built in module automation task that calls such methods within each module on a regular basis so the module can perform such actions if it desires. Requires some discussion See https://www.blesta.com/forums/index.php?/topic/4032-allow-modules-to-add-cron-tasks/&tab=comments#comment-54670 |
# Add a new optional feature for modules to support an automation method that may be called at a given interval by Blesta cron
#* Allow Input errors to be set? And if they are, include them in the cron log? Or simply assume the module will write errors to monolog? # Add a new core cron task to call the automation method on all installed modules Things to consider: # Modules are much similar to plugins now, and differentiating them while merging similar features may require refactoring (something to do in a major release) # Modules need database access. Loading the Record component may not suffice, and an instance of it may need to be provided instead # Logging mechanisms may need to be provided to the module and its automation task # Backward compatibility must be maintained # Modules may need more flexibility with automation tasks, such as better support for running multiple tasks, or knowledge of the last time a particular task was last run (like a normal cron task). It would not have this information unless it creates database tables and maintains it itself. #* It may need to integrate similar install/upgrade/uninstall functionality as plugins TODO: # Update Modules to support a new method, _cron($key)_, similar to plugins. Default to do nothing # Refactor CronTasks and the `plugin_dir` column to support modules #* Add a `type` column, ENUM(system, plugin, module), default system, after `key` #* Rename the `plugin_dir` column to `dir`. #* Update the unique index for (`key`, `plugin_dir`) to (`key`, `type`, `dir`) # Update for backward compatibility #* Update all returned objects to contain a 'plugin_dir' column. If `type` is 'plugin' then set 'plugin_dir' to the value of 'dir', otherwise null. #* Update existing CronTasks methods and queries that use 'plugin_dir' to continue to work as before #* Add any new methods necessary to implement the same functionality on the new structure. Deprecate existing methods accordingly #* Update all core system calls to CronTasks to use the new methods #* (Create new tasks for each core plugin that uses cron tasks to update them accordingly) ---- Consider allowing modules to create their own automation tasks. Such automation tasks could call methods within the module that registers the automation task to perform some action. Or, maybe this could be abstracted such that there is a built in module automation task that calls such methods within each module on a regular basis so the module can perform such actions if it desires. Requires some discussion See https://www.blesta.com/forums/index.php?/topic/4032-allow-modules-to-add-cron-tasks/&tab=comments#comment-54670 |
Tyson Phillips (Inactive)
made changes -
Description |
# Add a new optional feature for modules to support an automation method that may be called at a given interval by Blesta cron
#* Allow Input errors to be set? And if they are, include them in the cron log? Or simply assume the module will write errors to monolog? # Add a new core cron task to call the automation method on all installed modules Things to consider: # Modules are much similar to plugins now, and differentiating them while merging similar features may require refactoring (something to do in a major release) # Modules need database access. Loading the Record component may not suffice, and an instance of it may need to be provided instead # Logging mechanisms may need to be provided to the module and its automation task # Backward compatibility must be maintained # Modules may need more flexibility with automation tasks, such as better support for running multiple tasks, or knowledge of the last time a particular task was last run (like a normal cron task). It would not have this information unless it creates database tables and maintains it itself. #* It may need to integrate similar install/upgrade/uninstall functionality as plugins TODO: # Update Modules to support a new method, _cron($key)_, similar to plugins. Default to do nothing # Refactor CronTasks and the `plugin_dir` column to support modules #* Add a `type` column, ENUM(system, plugin, module), default system, after `key` #* Rename the `plugin_dir` column to `dir`. #* Update the unique index for (`key`, `plugin_dir`) to (`key`, `type`, `dir`) # Update for backward compatibility #* Update all returned objects to contain a 'plugin_dir' column. If `type` is 'plugin' then set 'plugin_dir' to the value of 'dir', otherwise null. #* Update existing CronTasks methods and queries that use 'plugin_dir' to continue to work as before #* Add any new methods necessary to implement the same functionality on the new structure. Deprecate existing methods accordingly #* Update all core system calls to CronTasks to use the new methods #* (Create new tasks for each core plugin that uses cron tasks to update them accordingly) ---- Consider allowing modules to create their own automation tasks. Such automation tasks could call methods within the module that registers the automation task to perform some action. Or, maybe this could be abstracted such that there is a built in module automation task that calls such methods within each module on a regular basis so the module can perform such actions if it desires. Requires some discussion See https://www.blesta.com/forums/index.php?/topic/4032-allow-modules-to-add-cron-tasks/&tab=comments#comment-54670 |
# Add a new optional feature for modules to support an automation method that may be called at a given interval by Blesta cron
#* Allow Input errors to be set? And if they are, include them in the cron log? Or simply assume the module will write errors to monolog? # Add a new core cron task to call the automation method on all installed modules Things to consider: # Modules are much similar to plugins now, and differentiating them while merging similar features may require refactoring (something to do in a major release) # Modules need database access. Loading the Record component may not suffice, and an instance of it may need to be provided instead # Logging mechanisms may need to be provided to the module and its automation task # Backward compatibility must be maintained # Modules may need more flexibility with automation tasks, such as better support for running multiple tasks, or knowledge of the last time a particular task was last run (like a normal cron task). It would not have this information unless it creates database tables and maintains it itself. #* It may need to integrate similar install/upgrade/uninstall functionality as plugins TODO: # Update Modules to support a new method, _cron($key)_, similar to plugins. Default to do nothing # Refactor CronTasks and the `plugin_dir` column to support modules #* Add a `type` column, ENUM(system, plugin, module), default system, after `key` #* Rename the `plugin_dir` column to `dir`. #* Update the unique index for (`key`, `plugin_dir`) to (`key`, `type`, `dir`) # Update for backward compatibility #* Update all returned objects to contain a 'plugin_dir' column. If `type` is 'plugin' then set 'plugin_dir' to the value of 'dir', otherwise null. *TEST* #* Update existing CronTasks methods and queries that use 'plugin_dir' to continue to work as before. *TEST* #* Add any new methods necessary to implement the same functionality on the new structure. Deprecate existing methods accordingly. *TEST* #* Update all core system calls to CronTasks to use the new methods. *TEST* #* (Create new tasks for each core plugin that uses cron tasks to update them accordingly) ---- Consider allowing modules to create their own automation tasks. Such automation tasks could call methods within the module that registers the automation task to perform some action. Or, maybe this could be abstracted such that there is a built in module automation task that calls such methods within each module on a regular basis so the module can perform such actions if it desires. Requires some discussion See https://www.blesta.com/forums/index.php?/topic/4032-allow-modules-to-add-cron-tasks/&tab=comments#comment-54670 |
Tyson Phillips (Inactive)
made changes -
Time Spent | 41 minutes [ 2460 ] | 1 hour, 58 minutes [ 7080 ] |
Worklog Id | 10834 [ 10834 ] |
Tyson Phillips (Inactive)
made changes -
Description |
# Add a new optional feature for modules to support an automation method that may be called at a given interval by Blesta cron
#* Allow Input errors to be set? And if they are, include them in the cron log? Or simply assume the module will write errors to monolog? # Add a new core cron task to call the automation method on all installed modules Things to consider: # Modules are much similar to plugins now, and differentiating them while merging similar features may require refactoring (something to do in a major release) # Modules need database access. Loading the Record component may not suffice, and an instance of it may need to be provided instead # Logging mechanisms may need to be provided to the module and its automation task # Backward compatibility must be maintained # Modules may need more flexibility with automation tasks, such as better support for running multiple tasks, or knowledge of the last time a particular task was last run (like a normal cron task). It would not have this information unless it creates database tables and maintains it itself. #* It may need to integrate similar install/upgrade/uninstall functionality as plugins TODO: # Update Modules to support a new method, _cron($key)_, similar to plugins. Default to do nothing # Refactor CronTasks and the `plugin_dir` column to support modules #* Add a `type` column, ENUM(system, plugin, module), default system, after `key` #* Rename the `plugin_dir` column to `dir`. #* Update the unique index for (`key`, `plugin_dir`) to (`key`, `type`, `dir`) # Update for backward compatibility #* Update all returned objects to contain a 'plugin_dir' column. If `type` is 'plugin' then set 'plugin_dir' to the value of 'dir', otherwise null. *TEST* #* Update existing CronTasks methods and queries that use 'plugin_dir' to continue to work as before. *TEST* #* Add any new methods necessary to implement the same functionality on the new structure. Deprecate existing methods accordingly. *TEST* #* Update all core system calls to CronTasks to use the new methods. *TEST* #* (Create new tasks for each core plugin that uses cron tasks to update them accordingly) ---- Consider allowing modules to create their own automation tasks. Such automation tasks could call methods within the module that registers the automation task to perform some action. Or, maybe this could be abstracted such that there is a built in module automation task that calls such methods within each module on a regular basis so the module can perform such actions if it desires. Requires some discussion See https://www.blesta.com/forums/index.php?/topic/4032-allow-modules-to-add-cron-tasks/&tab=comments#comment-54670 |
# Add a new optional feature for modules to support an automation method that may be called at a given interval by Blesta cron
#* Allow Input errors to be set? And if they are, include them in the cron log? Or simply assume the module will write errors to monolog? # Add a new core cron task to call the automation method on all installed modules Things to consider: # Modules are much similar to plugins now, and differentiating them while merging similar features may require refactoring (something to do in a major release) # Modules need database access. Loading the Record component may not suffice, and an instance of it may need to be provided instead # Logging mechanisms may need to be provided to the module and its automation task # Backward compatibility must be maintained # Modules may need more flexibility with automation tasks, such as better support for running multiple tasks, or knowledge of the last time a particular task was last run (like a normal cron task). It would not have this information unless it creates database tables and maintains it itself. #* It may need to integrate similar install/upgrade/uninstall functionality as plugins TODO: # Update Modules to support a new method, _cron($key)_, similar to plugins. Default to do nothing # Refactor CronTasks and the `plugin_dir` column to support modules #* Add a `type` column, ENUM(system, plugin, module), default system, after `key` #* Rename the `plugin_dir` column to `dir`. #* Update the unique index for (`key`, `plugin_dir`) to (`key`, `type`, `dir`) # Update for backward compatibility #* Update all returned objects to contain a 'plugin_dir' column. If `type` is 'plugin' then set 'plugin_dir' to the value of 'dir', otherwise null. *TEST* #* Update existing CronTasks methods and queries that use 'plugin_dir' to continue to work as before. *TEST* #* Add any new methods necessary to implement the same functionality on the new structure. Deprecate existing methods accordingly. *TEST* #* Update all core system calls to CronTasks to use the new methods. *TEST* #* (Create new tasks for each core plugin that uses cron tasks to update them accordingly) # Add a new task when the cron runs for running module tasks, similar to plugin cron tasks. TEST ---- Consider allowing modules to create their own automation tasks. Such automation tasks could call methods within the module that registers the automation task to perform some action. Or, maybe this could be abstracted such that there is a built in module automation task that calls such methods within each module on a regular basis so the module can perform such actions if it desires. Requires some discussion See https://www.blesta.com/forums/index.php?/topic/4032-allow-modules-to-add-cron-tasks/&tab=comments#comment-54670 |
Tyson Phillips (Inactive)
made changes -
Issue Type | New Feature [ 2 ] | Story [ 7 ] |
Tyson Phillips (Inactive)
made changes -
Time Spent | 1 hour, 58 minutes [ 7080 ] | 2 hours, 2 minutes [ 7320 ] |
Worklog Id | 10835 [ 10835 ] |
Tyson Phillips (Inactive)
made changes -
Sprint | 4.3.0 Sprint 5 [ 55 ] | 4.3.0 Sprint 5, 4.3.0 Sprint 6 [ 55, 56 ] |
Tyson Phillips (Inactive)
made changes -
Rank | Ranked higher |
Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
Status | Open [ 1 ] | In Progress [ 3 ] |
Tyson Phillips (Inactive)
made changes -
Time Spent | 2 hours, 2 minutes [ 7320 ] | 7 hours, 18 minutes [ 26280 ] |
Worklog Id | 10936 [ 10936 ] |
Tyson Phillips (Inactive)
made changes -
Epic Link |
|
Automated transition triggered when Tyson Phillips (Inactive) created pull request #415 in Stash -
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Tyson Phillips (Inactive)
made changes -
Resolution | Fixed [ 1 ] | |
Status | In Review [ 5 ] | Reopened [ 4 ] |
Tyson Phillips (Inactive)
made changes -
Status | Reopened [ 4 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Jonathan Reissmueller
made changes -
Time Spent | 7 hours, 18 minutes [ 26280 ] | 1 day, 26 minutes [ 30360 ] |
Worklog Id | 10943 [ 10943 ] |
Tyson Phillips (Inactive)
made changes -
Time Spent | 1 day, 26 minutes [ 30360 ] | 1 day, 51 minutes [ 31860 ] |
Worklog Id | 10944 [ 10944 ] |
Tyson Phillips (Inactive)
made changes -
Sprint | 4.3.0 Sprint 5, 4.3.0 Sprint 6 [ 55, 56 ] | 4.3.0 Sprint 5, 4.3.0 Sprint 6, 4.3.0 Sprint 7 [ 55, 56, 57 ] |
Tyson Phillips (Inactive)
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Time Spent | 1 day, 51 minutes [ 31860 ] | 1 day, 1 hour, 1 minute [ 32460 ] |
Worklog Id | 10970 [ 10970 ] |
Automated transition triggered when Tyson Phillips (Inactive) merged pull request #415 in Stash -
Status | In Review [ 5 ] | Closed [ 6 ] |
This sounds like a difficult task to integrate. Modules will need database access, similar to plugins, and this will probably change module design requirements and make them backward-incompatible with the current design. This also raises the question of the difference between modules and plugins and would likely lead to other refactoring.
This task may also be dependent on cron task refactoring in CORE-2518.