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

[bug] HTTP 数据源同步失败, 一直展示重试中 #404

Closed
wklken opened this issue May 7, 2022 · 1 comment
Closed

[bug] HTTP 数据源同步失败, 一直展示重试中 #404

wklken opened this issue May 7, 2022 · 1 comment
Assignees
Labels
Layer: api Api module related Priority: High Type: bug Something isn't working
Milestone

Comments

@wklken
Copy link
Collaborator

wklken commented May 7, 2022

bug: 重试结束后, 没有更新对应状态? 还是使用了不同的任务 ID 跟踪的重试?

可能跟 #402 有关系

@wklken wklken added Type: bug Something isn't working Layer: api Api module related Module: 🔗sync data Priority: High labels May 7, 2022
@wklken wklken added this to the Y2022M18-19 milestone May 7, 2022
@wklken wklken self-assigned this May 7, 2022
@wklken
Copy link
Collaborator Author

wklken commented May 7, 2022

image

  1. 手动同步, 失败重试, 始终是同一个task_id, 最终任务状态更新正确
  2. 定时任务, 失败重试, 每次都是一个新的task_id, 最终第 4 个失败变更fail, 其他3个会一直是重试状态

所以, 定时任务会一直产生queue(as result backend) 没有做进一步消费? #402

try:
task_id = SyncTask.objects.register_task(category=category, operator=operator, type_=SyncTaskType.AUTO).id
except ExistsSyncingTaskError as e:
logger.exception("register task fail, the task is already exists")
raise error_codes.LOAD_DATA_FAILED.f(str(e))

@wklken wklken closed this as completed May 7, 2022
wklken added a commit that referenced this issue May 9, 2022
* fix(api/sync_data): custom sync from crontab use the same task_id (close #404)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: api Api module related Priority: High Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant