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

归档时在Scheduled tasks设置后还是30s执行一次 #699

Closed
falcondance opened this issue Apr 2, 2020 · 5 comments
Closed

归档时在Scheduled tasks设置后还是30s执行一次 #699

falcondance opened this issue Apr 2, 2020 · 5 comments
Labels
wontfix This will not be worked on

Comments

@falcondance
Copy link
Contributor

归档时在Scheduled tasks设置后还是30s执行一次,必须调整archery/settings.py中USE_TZ = True才能进行正常的定时执行,但是配置USE_TZ = True后会导致datetime.now()的时间-8小时,出现各种问题,包括上线中的定时执行校验失败,日志中时间差异等等。
有什么好的办法避免使用USE_TZ = True吗?否则改动太大

重现步骤

USE_TZ = False时,配置1分钟一次,但实际30s执行一次

期待结果和实际结果

期待结果:
可以正常配置归档时间
实际结果:

截图

image

错误日志

USE_TZ = True时上线定时执行报错
image

版本信息

应用版本/分支:
1.7.8
部署方式:手工部署

@hhyo
Copy link
Owner

hhyo commented Apr 11, 2020

相关问题已经在Koed00/django-q#353 修复,并发布于django_q == 1.0.2
确认下你django_q的版本,我这边验证是没有问题的

@falcondance
Copy link
Contributor Author

falcondance commented Apr 14, 2020

django_q的版本是1.2.1,而且演示环境好像也有同样的问题。
https://demo.archerydms.com/archive/7/
https://demo.archerydms.com/admin/django_q/success/

archive-7 sql.archiver.archive 2020-04-13 09:48:48 2020-04-13 09:48:48 0.16764 archive-2020-04-13 09:48:48
dakota-winter-romeo-lactose sql.archiver.add_archive_task 2020-04-13 09:48:48 2020-04-13 09:48:48 0.035283 归档数据
archive-7 sql.archiver.archive 2020-04-13 09:48:18 2020-04-13 09:48:18 0.167309 archive-2020-04-13 09:48:18
mexico-eleven-muppet-hotel sql.archiver.add_archive_task 2020-04-13 09:48:18 2020-04-13 09:48:18 0.026393 归档数据
archive-7 sql.archiver.archive 2020-04-13 09:47:48 2020-04-13 09:47:48 0.175732 archive-2020-04-13 09:47:48
vegan-mountain-berlin-alpha sql.archiver.add_archive_task 2020-04-13 09:47:48 2020-04-13 09:47:48 0.026423 归档数据
archive-7 sql.archiver.archive 2020-04-13 09:47:17 2020-04-13 09:47:18 0.18931 archive-2020-04-13 09:47:17
mirror-jupiter-monkey-fix sql.archiver.add_archive_task 2020-04-13 09:47:17 2020-04-13 09:47:17 0.026867 归档数据
archive-7 sql.archiver.archive 2020-04-13 09:46:47 2020-04-13 09:46:48 0.173972 archive-2020-04-13 09:46:47
ten-quiet-moon-fix sql.archiver.add_archive_task 2020-04-13 09:46:47 2020-04-13 09:46:47 0.028888 归档数据
.......

@falcondance
Copy link
Contributor Author

django_q 1.2.1 这段bugfix代码被覆盖掉了,需要重新再加上

@hhyo
Copy link
Owner

hhyo commented Apr 14, 2020

确实,可先回滚到1.1.0

@stale
Copy link

stale bot commented Apr 29, 2020

你已经很久没有回复这个issue了,如果没有进一步的信息的话, 会作为不活跃issue关闭, 感谢你对本项目的贡献。
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Apr 29, 2020
@stale stale bot closed this as completed May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants