1 Star 0 Fork 0

CallMeE / dophon-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Bootstrap.py 684 Bytes
一键复制 编辑 原始数据 按行查看 历史
CallMeE 提交于 2018-09-14 21:20 . 2018-09-14
# coding: utf-8
from dophon import boot
import threading
import schedule
s=schedule.Scheduler()
def sche():
s.every(1).seconds.do(print,(666,))
def start():
import time
while True:
s.run_pending()
time.sleep(1)
from dophon.annotation import *
class BeanConfigs(BeanConfig):
@bean()
def call_beans(self):
return bean_class()
class bean_class():
def call(self):
print('call')
with BeanConfigs() as b:
pass
# 启动服务器
def run():
import threading
# sche()
# threading.Thread(target=start).start()
boot.bootstrap_app()
# 启动服务器
# boot.run_app_ssl()`
boot.run_app()
run()
1
https://gitee.com/callmee/dophon-demo.git
git@gitee.com:callmee/dophon-demo.git
callmee
dophon-demo
dophon-demo
master

搜索帮助