Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: add task manager #490

Merged
merged 45 commits into from
Aug 3, 2021
Merged

feat: add task manager #490

merged 45 commits into from
Aug 3, 2021

Conversation

gaius-qi
Copy link
Member

Description

  • Add task manager.

Related Issue

Fixes #482

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist:

  • Code compiles correctly.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@gaius-qi gaius-qi added this to the v2.0.0 milestone Jul 22, 2021
@gaius-qi gaius-qi self-assigned this Jul 22, 2021
@gaius-qi gaius-qi requested a review from a team as a code owner July 22, 2021 10:07
gaius-qi added 2 commits July 22, 2021 18:12
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2021

Codecov Report

Merging #490 (4d2a9a8) into main (ea0ae4f) will decrease coverage by 0.35%.
The diff coverage is 35.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #490      +/-   ##
==========================================
- Coverage   39.54%   39.18%   -0.36%     
==========================================
  Files          82       85       +3     
  Lines        6352     6438      +86     
==========================================
+ Hits         2512     2523      +11     
- Misses       3476     3550      +74     
- Partials      364      365       +1     
Flag Coverage Δ
e2etests ∅ <ø> (∅)
unittests 39.18% <35.29%> (-0.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
manager/config/config.go 0.00% <0.00%> (ø)
internal/tasks/tasks.go 21.56% <21.56%> (ø)
scheduler/config/config.go 4.81% <22.22%> (+4.81%) ⬆️
internal/tasks/queue.go 85.71% <85.71%> (ø)
client/daemon/transport/transport.go 72.28% <100.00%> (-3.25%) ⬇️
pkg/util/net/httputils/http_utils.go 100.00% <100.00%> (ø)
client/daemon/peer/peertask_stream.go 55.07% <0.00%> (-2.54%) ⬇️
client/daemon/peer/peertask_base.go 32.24% <0.00%> (-0.71%) ⬇️
... and 1 more

gaius-qi and others added 16 commits July 23, 2021 10:28
Signed-off-by: Gaius <gaius.qi@gmail.com>
* feat: add func SendTask to struct Tasks

Signed-off-by: 张哲溢 <zhangzheyi@zhangzheyideMacBook-Pro.local>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
* test: add unit test cases for marshal

Signed-off-by: zzy987 <nevermind@sjtu.edu.cn>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
gaius-qi and others added 19 commits July 26, 2021 17:56
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
* feat: add unit test cases for marshal

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
…e/async-task

Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
…e/async-task

Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
…511)

* chore: rename task to tasks

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: move convert redis host config into root.go

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: check task before serve

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: use go-playground/validator

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* fix: refactor round robin result, add time out

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: make timeout time and tick time consts

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: delete time out

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: rename convert

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: rename tasks

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: validate whole request struct

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: delete unused const

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: rename const

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* test: add unit test for convert

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: resolve tasks package name

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
…#514)

* chore: rename task to tasks

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
…e/async-task

Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
@gaius-qi gaius-qi merged commit 86620ca into main Aug 3, 2021
@gaius-qi gaius-qi deleted the feature/async-task branch August 3, 2021 05:54
gaius-qi added a commit that referenced this pull request Jun 28, 2023
* feat: add task manager

Signed-off-by: Gaius <gaius.qi@gmail.com>

Co-authored-by: zzy987 <67889264+zzy987@users.noreply.github.com>
e-ngo pushed a commit to e-ngo/dragonfly that referenced this pull request Jan 23, 2025
Signed-off-by: Gaius <gaius.qi@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Async Task Manager
5 participants