Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

定时任务和异步任务 #97

Open
Allrivers-maker opened this issue May 17, 2023 · 28 comments
Open

定时任务和异步任务 #97

Allrivers-maker opened this issue May 17, 2023 · 28 comments
Assignees
Labels
bug Something isn't working

Comments

@Allrivers-maker
Copy link

描述问题
定时任务和和手动执行没有效果

重现步骤
重现行为的步骤:

  1. 前往定时任务页面
  2. 点击定时任务某一行的后面手动执行按钮
  3. 返回信息用例执行中,稍后查看结果
  4. 等几十分钟报告也没有出来

期望的行为
想知道定时任务和异步执行的报告 是在报告列表中展现的么

版本和代码(请填写以下信息):
https://fast.huacai.one/fastrunner/login

@Allrivers-maker Allrivers-maker added the bug Something isn't working label May 17, 2023
@lihuacai168
Copy link
Owner

在项目根目录执行make ps,查看mq,celery-beat和celery-worker状态是否正常
看看celery-beat和celery-worker,make logs可以看到

@Allrivers-maker
Copy link
Author

我本地windows能看到么 想执行celery-worker一直开不了

@lihuacai168
Copy link
Owner

image 异步和定时报告,需要关闭只看自己

@lihuacai168
Copy link
Owner

我本地windows能看到么 想执行celery-worker一直开不了

异步和定时任务,需要mq,celery-beat和celery-worker

@Allrivers-maker
Copy link
Author

我们这里自己部署的线上是有这些docker开启的

@lihuacai168
Copy link
Owner

那线上的定时任务是否正常?
不正常就提供我上面说的日志

@lihuacai168
Copy link
Owner

image 我看演示demo是有报告的,不知道是不是你操作的

@Allrivers-maker
Copy link
Author

是的 我刚刚操作的

@Allrivers-maker
Copy link
Author

rabbitmq线上需要配置什么host么 还是不动 直接启动容器就行

@lihuacai168
Copy link
Owner

rabbitmq线上需要配置什么host么 还是不动 直接启动容器就行

不需要,可以看快速启动的文档,先启动来验证。
环境变量后面在自己修改一下就好

@Allrivers-maker
Copy link
Author

定时任务没执行是不是因为 时间保存的格式 是 UTC

@lihuacai168
Copy link
Owner

定时任务没执行是不是因为 时间保存的格式 是 UTC

有可能,可以用在线demo验证一下

@Allrivers-maker
Copy link
Author

在线demo没有效果

@lihuacai168
Copy link
Owner

没效果指的是不能复现?还是不能使用

@Allrivers-maker
Copy link
Author

定时任务没运行

@lihuacai168
Copy link
Owner

是跟utc时间有关系。。
这里改成3,也就是相当于北京时间的11点,就能正常触发,改成11,就不能触发。
image

@Allrivers-maker
Copy link
Author

我改成每2分钟一次好像不执行

@Allrivers-maker
Copy link
Author

celery 和rabbitmq连上了 但是触发worker能收到消息 不能消费

@lihuacai168
Copy link
Owner

我改成每2分钟一次好像不执行

没问题的,在线demo你可以看看

@Allrivers-maker
Copy link
Author

我这边看部署的是我把worker容器进程关了 rabbitmq队列中是有消息堆积的 就是worker这里打开会接收消费 但是不执行方法有点奇怪

@Allrivers-maker
Copy link
Author

想问下大佬 你的linux线上环境是多少版本的 我这边是5.1.4

@lihuacai168
Copy link
Owner

如果你没改过代码,正常是会消费的

@lihuacai168
Copy link
Owner

你指的是什么版本

@Allrivers-maker
Copy link
Author

如果你没改过代码,正常是会消费的

没改过 就用的你docker部署搞的

@Allrivers-maker
Copy link
Author

会不会与linux版本有关系 worker拿到任务了 没有执行异步方法

@lihuacai168
Copy link
Owner

worker运行在docker里面,没关系的

@Allrivers-maker
Copy link
Author

大佬 帮忙看看这个问题

@lihuacai168
Copy link
Owner

大佬 帮忙看看这个问题

抱歉,目前提供的内容,我无法帮你解答

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants