fcfangcc / pyxxl

XXL-JOB的Python执行器实现,可以方便的将Python方法注册到XXL-JOB的调度中心上进行管理
https://fcfangcc.github.io/pyxxl/
GNU General Public License v3.0
60 stars 16 forks source link

任务参数executorParams获取 #13

Closed zacat closed 2 years ago

zacat commented 2 years ago

如何在hander里获取RunData里的executorParams?

fcfangcc commented 2 years ago
from pyxxl.ctx import g

@xxxxx
async def text_ctx():
    logId = g.xxl_run_data.logId
    assert logId == 1

g.xxl_run_data 支持获取参数可以看 https://fcfangcc.github.io/pyxxl/apis/run_data/

zacat commented 2 years ago

OK