-
Notifications
You must be signed in to change notification settings - Fork 373
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
perf: 周期任务运营优化 #7364 #7399
perf: 周期任务运营优化 #7364 #7399
Conversation
config/default.py
Outdated
PERIOD_TASK_TIMES = env.PERIOD_TASK_TIMES | ||
|
||
# 周期任务自动关闭扫描周期 | ||
EXPIRED_SESSION_PERIOD_TASK_SCAN = env.EXPIRED_SESSION_PERIOD_TASK_SCAN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PERIODIC_TASK_REMINDER_SCAN_CRON
</section> | ||
<div class="renewal-action-flex"> | ||
<div class="renewal-action" id="renewal-button"><a style="color: #fff;" href="{{ url }}">马上续期</a></div> | ||
<!-- <div>如不再需要,请在<a style="color: #3a84ff;" href="{{ index_url }}">「我的权限」</a>页面回收</div> --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没用的代码直接去掉
gcloud/core/tasks.py
Outdated
queryset = PeriodicTask.objects.filter(task__celery_task__enabled=True).order_by("-edit_time") | ||
task_creators = queryset.values("task__creator").distinct() | ||
data = {} | ||
for task_creator in task_creators: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里面的查询建议优化下,在 for 里面做的查询太多了,建议做统一的数据获取,然后在循环中计算
d443737
to
a55c9c2
Compare
需要补充一个管理员接口 |
a2cc98f
into
TencentBlueKing:feature_periodic_task_optimization_master
No description provided.