HawkXP71 136 Posted yesterday at 03:57 PM Posted yesterday at 03:57 PM (edited) The plugin I am working on, has a number of "tasks". Rather than one monolithic task that runs on a given schedule. It has one controller task, that call the subtasks. I've seen a similar situation in other plugins, where the dev has the default trigger time staggered (ie running the first step at 12:30, the second at 1am, then 1:30 etc etc) I would be great if this was part of the system. My suggestion, create a new interface IControllerTask, where a ILibraryPostScanTask or a IScheduledTask (not sure if there are others) could using multiple inheritance derive from IControllerTask as well A required function "List of subordinate" tasks would be required to override, where you would give in order the class types of the tasks to run. Then when the controller task is called, it would first run its "Execute" or "Run" (which btw, not sure WHY the API is different, or why the arguments are different since they both take a cancellation token and progress but in opposite order), then it would automatically run and track the subordinate tasks. Each subordinate task should be able to be run on its own, possibly on a completely different schedule. Ie, the main one runs M-F at 1230 AM but one subordinate runs Sat and Sunday. Then the "progress" for the main one, could use a combination of its own progress + the subordinate. For example, if a controller had 4 subtasks, when the controller set the progress to 50%, it would show on screen as 10% (since its only 20% of the total task), Then when it finished it would show 100% (the base class for controller task would automatically set it to the appropriate percentage when Execute/Run finished) Then for each subordinate task as they set the progress it would be N*20% + percent*20%, ie sub 2 at 30% would be 40%+its .3*.2 or 46% would be shown on the controller progress, while the subordinate progress would show 30% The UI for scheduled tasks would need to somehow show they are subordinate (I used a • + the order on mine so sorting works out with the primary first). I would 100% be willing to work on this TIA Edited yesterday at 04:01 PM by HawkXP71 Added image 1
Luke 43461 Posted 23 hours ago Posted 23 hours ago Hi, yes improved task reporting is planned for future updates. Thanks.
HawkXP71 136 Posted 21 hours ago Author Posted 21 hours ago 2 hours ago, Luke said: Hi, yes improved task reporting is planned for future updates. Thanks. Any eta? 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now