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

Module restructure and error handling in worker #97

Merged
merged 6 commits into from
May 5, 2022

Conversation

adzialocha
Copy link
Member

@adzialocha adzialocha commented May 2, 2022

  • Restructure modules a little (rename Runtime to Node and service_message.rs to bus.rs)
  • Introduce materializer service, move worker.rs there
  • Prepare tasks which will be implemented in further PRs
  • Catch errors in worker and propagate them further to service manager

Closes: #88 and #87

📋 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@adzialocha adzialocha changed the base branch from main to development May 2, 2022 14:57
@adzialocha adzialocha changed the title Materializer Service Folder restructure and error handling in worker May 3, 2022
@adzialocha adzialocha changed the title Folder restructure and error handling in worker Module restructure and error handling in worker May 3, 2022
@adzialocha adzialocha requested review from sandreae and cafca May 5, 2022 13:09
@adzialocha adzialocha marked this pull request as ready for review May 5, 2022 13:09
Copy link
Member

@sandreae sandreae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me, thanks!

@@ -58,10 +58,10 @@ Configurable node server implementation for the [`p2panda`] network which can be
Embed the node server in your Rust application or web container like [`Tauri`]:

```rust
use aquadoggo::{Configuration, Runtime};
use aquadoggo::{Configuration, Node};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this rename 👍

use crate::materializer::TaskInput;

pub async fn reduce_task(context: Context, input: TaskInput) -> TaskResult<TaskInput> {
// @TODO: Load operations from database
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the note ;-p

@adzialocha adzialocha merged commit 24ba31e into development May 5, 2022
@adzialocha adzialocha deleted the materializer branch May 5, 2022 13:45
@adzialocha adzialocha linked an issue May 10, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce worker service
2 participants