关于重构
#285
Replies: 2 comments 3 replies
-
我感觉这是一个完全off topic discussion,完全没理解这和jmcomic有什么关系(⑉⊙ȏ⊙) |
Beta Was this translation helpful? Give feedback.
2 replies
-
你指的client和server是什么?这跟部署又有啥关系,jmcomic需要部署吗? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
对于时间管理, 这里推荐一个库
Apscheduler
, 它没有cron复杂和重型, 功能却很丰富. 以下是我编写的一个简单的Sheduler类型, 能够实现多进程地运行协程任务, 我认为这比使用进程线程结合更加高效(得益于协程比线程切换起来更高效).具体使用方案可以看我的ApiBomber项目.
另外建议重构以实现分离Client和Server, 能更方便地部署到服务器上, 我的ApiBomber封装了一个简单的AsyncServer类, 应该是可以直接搬过来的.
注: 代码和项目都处于早期阶段, 极有可能存在恶性Bug.
Beta Was this translation helpful? Give feedback.
All reactions