feat(manager): Make the manager responsible for saving the tasks.#417
Open
VoyTechnology wants to merge 3 commits intodevelopfrom
Open
feat(manager): Make the manager responsible for saving the tasks.#417VoyTechnology wants to merge 3 commits intodevelopfrom
VoyTechnology wants to merge 3 commits intodevelopfrom
Conversation
This change adds a empty state store which does nothing. It is not yet fully decided what component should be storing the state, so the default is changed for the worker do not save any data.
GoldenBadger
requested changes
Apr 12, 2018
manager/src/state/file.rs
Outdated
| } | ||
| } | ||
|
|
||
| Ok(()) |
Contributor
There was a problem hiding this comment.
You can remove this and remove the return keywords in the match statement for brevity.
GoldenBadger
requested changes
Apr 12, 2018
| .context(StateErrorKind::PendingTaskWriteFailed)? | ||
| .write_all(&task_id.as_bytes()) | ||
| .context(StateErrorKind::PendingTaskWriteFailed)?; | ||
| Ok(()) |
Contributor
There was a problem hiding this comment.
all of these can be removed if you remove the semicolon on the previous lines
Member
Author
There was a problem hiding this comment.
I get the following error when I do this:
error[E0308]: match arms have incompatible types
--> manager/src/state/file.rs:138:17
|
138 | / File::create(pending_file_path)
139 | | .context(StateErrorKind::PendingTaskWriteFailed)?
140 | | .write_all(&task_id.as_bytes())
141 | | .context(StateErrorKind::PendingTaskWriteFailed)?
| |_____________________________________________________________________^ expected enum `std::result::Result`, found ()
|
= note: expected type `std::result::Result<(), state::StateError>`
found type `()`
Member
Author
There was a problem hiding this comment.
Would I just wrap the whole statement in Ok(...)?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds a empty state store which does nothing. It is not yet fully decided what component should be storing the state, so the default is changed for the worker do not save any data.
The role of saving the progress of tasks falls onto manager.