pyxxl icon indicating copy to clipboard operation
pyxxl copied to clipboard

有集成django的示例吗?

Open MnameHZJ opened this issue 1 year ago • 3 comments

Problem description

本地启动django,集成了pyxxl,pyxxl的端口启动成功了,也成功注册到了xxl-job。但是xxl-job调度的时候,pyxxl提示 handler xxx not found

MnameHZJ avatar Apr 23 '25 10:04 MnameHZJ

可以贴一下pyxxl的启动日志,启动的时候会打印加载的所有函数名字。看起来是没有加载相应的函数,调度的时候找不到

fcfangcc avatar Apr 24 '25 01:04 fcfangcc

想问下怎么在django项目里集成pyxxl呀,我怕单独运行app.run_executor()的话,定时任务没法访问到django中注册的各种类,包括数据库实体类什么的。 是要把app.run_executor()写在django启动的函数里吗?

timhengc avatar Apr 25 '25 09:04 timhengc

想问下怎么在django项目里集成pyxxl呀,我怕单独运行app.run_executor()的话,定时任务没法访问到django中注册的各种类,包括数据库实体类什么的。 是要把app.run_executor()写在django启动的函数里吗?

新版本的Django是开箱即用的,理论上不会有问题。直接app.run_executor()启动就行,前提是正确import了相应了文件

fcfangcc avatar May 06 '25 06:05 fcfangcc

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 06 '25 03:06 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Jun 13 '25 03:06 github-actions[bot]