- 👋 I’m a DevOps developer in company, with Python🐍,Vue...
- ☝ I'm current learning and using Rust.
🧑💼
XXL-JOB的Python执行器实现,可以方便的将Python方法注册到XXL-JOB的调度中心上进行管理
Home Page: https://fcfangcc.github.io/pyxxl/
License: GNU General Public License v3.0
xxl admin同时进行三次调度,即任务执行在同一秒,xxl日志显示1毫秒完成三次任务发送,三次任务参数不同;
python执行器获取到的三次参数,有一次重复,即同一参数的任务获取了两次,另一任务参数未获取到;
还不清楚什么原因;
@app.register(name="processData")
async def test_task():
# 模拟异步操作
await asyncio.sleep(1)
return "成功..."
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pyxxl/executor.py", line 228, in _run
await self.xxl_client.callback(data.logId, start_time, code=200, msg=result)
File "/usr/local/lib/python3.9/site-packages/pyxxl/xxl_client.py", line 81, in callback
await self._post("callback", payload)
File "/usr/local/lib/python3.9/site-packages/pyxxl/xxl_client.py", line 93, in _post
raise XXLRegisterError(r.msg or "")
pyxxl.error.XXLRegisterError: java.lang.NullPointerException
感谢作者开发该项目,希望能一起帮忙解决
AttributeError: Can't pickle local object 'PyxxlRunner.run_with_daemon.._runner'
搭配 FastAPI 一起使用时,按照文档上的方法操作,发现爆这个错误
python 3.9.15
试了一下 example 也同样有这个问题
self.cfg.when_ready(self)
File "gunicorn.conf.py", line 30, in when_ready
runner.run_with_daemon()
File "/Users/xxx/xxx/xxx/pyxxl/example/gunicorn_app/env/lib/python3.9/site-packages/pyxxl/main.py", line 110, in run_with_daemon
daemon.start()
File "/opt/homebrew/Cellar/[email protected]/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/opt/homebrew/Cellar/[email protected]/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/opt/homebrew/Cellar/[email protected]/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/opt/homebrew/Cellar/[email protected]/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/opt/homebrew/Cellar/[email protected]/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/opt/homebrew/Cellar/[email protected]/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/opt/homebrew/Cellar/[email protected]/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'PyxxlRunner.run_with_daemon.<locals>._runner'
2023-11-02 13:37:08.362 [MainThread] [170428] WARNING /usr/local/lib/python3.9/site-packages/pyxxl/executor.py(_run:237) -
Traceback (most recent call last):
File "/app/main.py", line 21, in test_task
await asyncio.sleep(1)
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 652, in sleep
return await future
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 490, in wait_for
return fut.result()
asyncio.exceptions.CancelledError
在一个文件里定义了xxl_handler = JobHandler(),然后其他文件引入发现其他文件注册的任务并不生效,看起来没有像路由那样的 include方法
是否能适配的XXL-JOB 2.4.0 版本
如何和flask进行集成?
app.run_executor()会起一个web服务器,且是阻塞的,无法和flask进行集成
目前的示例和文档仅包含正常情况下的返回
1.如何返回错误?使得调度中心能触发错误重试或故障转移?
2.再有就是执行的进度如何返回?
xxl_admin_baseurl为https时会有问题,[SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')]
主要是服务器上需要账户密码
你好,帮忙看下,注册时连接报错
如何在hander里获取RunData里的executorParams?
我看执行器配置中好像没有log_path字段,执行日志如何同步到xxljob调度中心呢
运行任务有时候JOB不会执行任何操作。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.