[ENH] Routine functionality #5
Labels
No labels
Automated
Backlog
Post_Prototype_1.0
Bot_Code
Core
Bot_Code
Custom
CI/CD
Complexity
Advanced
Complexity
Basic
Complexity
Expert
Complexity
Intermediate
Kind/Breaking
Kind/Bug
Kind/Bug Fix
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Nix
Ownership
Collab
Ownership
Collab with Leads
Ownership
Individual Lead
Ownership
In-Review
Ownership
Needs Owner > May Delegate
Ownership
Workshop with Leads
Phase 1.0
Requirements > Drafting
Phase 1.0
Requirements > Researching
Phase 1.0
Requirements > Review & Planning
Phase 2.0
Design > Research & Analysis
Phase 3.0
Coding > Implementation
Phase 4.0
QA > Unit Testing & Design
Phase 5.0
Resolution > Completed
Phase 5.0
Resolution > Review for Completion
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
#40 WIP: Basic Routine Functionality
modulatingforce/forcebot_rs
Reference: modulatingforce/forcebot_rs#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Initial Description
Similar to py implementation of forcebot, I'd like some easy way to implement routines that can be easily defined so that a developer can just worry about what the routine does and how often the routine is triggered
This could be used, for example, to post periodic messages in chat after x number of minutes
Not a high priority at the moment
Plan of Action :
Thinking about this off and on, I thought of maybe having
Routine
s be similar toListener
BotAction
, and simply call the execution body when a servermsg is received . But aRoutine
would then really depend on whether the bot receives a servermsg or notHowever, I believe there might be better ways involving async related coding/functionality? Worst case, I can review py twitchio code or compare with how others use the same library to create routines
I am 100% certain this can be implemented through async
Maybe something like the following
the async fn could be defined like the following
Generally, a Module Developer May be able to do the following define a module, then spawn that module without any extra functionality from the bot
That, or I could add in methods to
Routine
toStart()
/Stop()
for easeI would think we can store this as
Vector<Routine>
. If required, we can create business logic toabort()
these handleshttps://docs.rs/tokio/latest/tokio/task/struct.JoinHandle.html#method.abort
Hmm. I'm pretty sure the above can be refined even more, but working atm
Routine
functionality is addedRoutines
, when a module is set to Disabled, it should also Abort all running routines for the Module >> At least ensure this requirement is in the Routines issue