-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: integrate pipeline to storage #6
feat: integrate pipeline to storage #6
Conversation
return Ok(WorkSchedule::Unit(tx)); | ||
} | ||
|
||
sleep(Duration::from_secs(1)).await; |
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.
why do we have this sleep?
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.
Because without the sleep it requests the db a lot of time. Would you happen to have a better solution?
pub struct Transaction { | ||
pub cbor: Vec<u8>, | ||
} | ||
|
||
pub async fn run(config: Config, tx_storage: Arc<SqliteTransaction>) -> Result<()> { | ||
tokio::spawn(async move { |
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.
why are we putting all of this inside a spawn?
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.
We don't need it, I left it there.
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.
When I executed tonic and gasket without spawn a new thread, for some reason the application wasn't stopping.
No description provided.