noctisynth / aionbot

Rust-based high concurrency cross platform bot runtime
GNU Affero General Public License v3.0
2 stars 4 forks source link

[Refactor]: Runtime should return an enum but not never #12

Closed fu050409 closed 5 days ago

fu050409 commented 6 days ago

Now our runtime returns nothing (anyhow::Result<()>), we should poll runtime outside.

Runtime::run should returns enum RuntimeStatus like:

enum RuntimeStatus {
    Pending,
    Exit,
    Next,
    Restart,
}