Comments (19)
是单独启动另一个web服务。实际上原理就很简单,如果在装饰器设置任务持久化,他是自动批量聚合把状态结果发布到mongodb里面去了,然后有一个web服务需要单独启动,web 实时不停读取mongodb的数据展示到页面上。
from distributed_framework.
和python脚本自身的日志相比,页面的有2到4秒的延迟。这些执行结果信息在日志中全部都有了,框架很注重日志流程细节,你说的这些重要流程节点,对每一个任务都会打印和保存日志的
from distributed_framework.
from distributed_framework.
看到文档中有提到可视化的任务状态页面,请问应该如何获取这些数据来构建自定义的可视化页面?
你看下这个图片,你说的这些执行结果,耗时,入参在python自身日志已近打印和保存文件了。你设置装饰器任务持久化为True,然后启动web也可以看到这些信息。
from distributed_framework.
我将参数设置成了
function_result_status_persistance_conf=FunctionResultStatusPersistanceConfig(True, True, 7 * 24 * 3600)
现在它确实可以在mongodb里面显示已经执行完成的任务。我观察到当任务执行完成才会加入到mongoDB中,但是如果一个任务需要执行非常长的时间,我想要监控它的运行情况,是否有一个可行的方案呢?
from distributed_framework.
我将参数设置成了
function_result_status_persistance_conf=FunctionResultStatusPersistanceConfig(True, True, 7 * 24 * 3600)
现在它确实可以在mongodb里面显示已经执行完成的任务。我观察到当任务执行完成才会加入到mongoDB中,但是如果一个任务需要执行非常长的时间,我想要监控它的运行情况,是否有一个可行的方案呢?
是的,确实是执行完成后才会增加到mongo,然后才能显示到页面。此框架希望用户的函数耗时是10分钟以内比较合适,你的任务多久时间?
from distributed_framework.
一个函数是一个最小的粒度,并不可能知道一个函数执行的进度是是执行到了哪一行,函数的执行进度是到了百分之多少,只能让函数作为一个整体,要么是执行中要么是执行完成。你想时刻监控一个函数的内部执行到了百分之多少的进度这是不可能的。
from distributed_framework.
可能会比较长时间,例如周期性地执行深度学习任务。不知道是否能让用户看到“xx任务正在执行”这样的信息?
from distributed_framework.
可能会比较长时间,例如周期性地执行深度学习任务。不知道是否能让用户看到“xx任务正在执行”这样的信息?
执行中状态我可以加,但是不能加函数内部运行耗时的精确进度。
from distributed_framework.
不需要精确的进度。如果可以获取到执行中的任务的id,也方便我们做额外的拓展,例如将id和用户关联起来,让每个用户都可以只看到自己的任务。
from distributed_framework.
可以加个pending状态到mongodb,然后执行完成后再把结果和执行时候正常更新mongo。
from distributed_framework.
非常感谢,希望加入pending和active
from distributed_framework.
active代表什么,只会有peding和finish
from distributed_framework.
等待中、执行中、执行完成?
from distributed_framework.
等待中、执行中、执行完成?
浪费性能感觉这样,这个框架是追求每秒万次函数执行,你说的这么搞浪费性能,主要是不适用。如果你能看到可以改这个方法,AbstractConsumer 的 _run_consuming_function_with_confirm_and_retry
from distributed_framework.
等待中、执行中、执行完成?
可以看看框架的rpc模式张杰,使用rpc模式就能够获取是否是正在执行和获取函数结果。rpc模式扩展性很强,使得程序外部可以获得程序内部的任务状态。
from distributed_framework.
看了一下文档,请问rpc的status_and_result
应该如何和fsdf_background_scheduler.add_job
结合起来?以及它是否只支持redis?
from distributed_framework.
看了一下文档,请问rpc的
status_and_result
应该如何和fsdf_background_scheduler.add_job
结合起来?以及它是否只支持redis?
那是个问题,手动发布fun.push()s是返回一个对象,可以得到task_id和结果。fsdf_background_scheduler.add_job是程序内部自动定时发布任务到中间件,所以你在程序外部无法得到task_id是什么,需要对框架代码改造那。
from distributed_framework.
看了一下文档,请问rpc的
status_and_result
应该如何和fsdf_background_scheduler.add_job
结合起来?以及它是否只支持redis?
rpc模式固定使用的是redis实现的,就是不管broker_kind选用什么消息中间件,如果要使用rpc模式即从发布端得到消费端结果,就一定要配置好redis的账号密码。框架支持20种消息队列中间件可选,但如果要使用框架的rpc模式和任务过滤功能(函数入参过滤)以及分布式控频这三个功能,就必须配置好redis账号密码。因为我没那么多精力去实现所有类型中间件本身的rpc模式,例如mysql rabbitmq kafka 都可以拿来原生实现或模拟实现rpc,但我没那么多时间,反正redis是很常用的几乎每个人都安装了。
from distributed_framework.
Related Issues (20)
- 请问可以支持调整任务队列的size吗 HOT 5
- 上下游任务调度 HOT 3
- 关于任务 HOT 1
- 关于log输出的兼容问题 HOT 3
- 定时任务应该如何关闭 HOT 2
- 你好请问这个框架在tornado怎么使用 HOT 1
- ModuleNotFoundError: No module named 'nb_log_config' HOT 2
- 在使用多个步骤的消费函数的时候发布的任务不执行 HOT 10
- 建议改个名字 HOT 3
- 是否有类似celery的任务编排功能 HOT 6
- 别的可能什么都好,但就名字... HOT 1
- 体验 HOT 3
- 能否加上一个获得返回值的demo,我使用redis的demo。 HOT 6
- RabbitMQ连接不上,找不到能讨论的地方只能来这里了 HOT 2
- 几点建议 HOT 5
- python3.9 设置function_timeout 引发异常 HOT 3
- PySnooper 包引用相关 HOT 3
- worker平滑关闭问题 HOT 4
- 新手入门,求个能跑起来的demo HOT 2
- 服务器部署运行函数,如果函数使用了第三方库,但是服务器的python解释器没有安装该第三方库,该如何解决? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from distributed_framework.