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

feat: integrate pipeline to storage #6

Merged
merged 7 commits into from
Jan 27, 2025

Conversation

paulobressan
Copy link
Member

@paulobressan paulobressan commented Jan 24, 2025

No description provided.

@paulobressan paulobressan marked this pull request as ready for review January 24, 2025 18:35
@paulobressan paulobressan changed the title feat(storage): implemented next and update query feat: integrate pipeline to storage Jan 24, 2025
return Ok(WorkSchedule::Unit(tx));
}

sleep(Duration::from_secs(1)).await;
Copy link
Member

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?

Copy link
Member Author

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 {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

@paulobressan paulobressan Jan 27, 2025

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.

@scarmuega scarmuega merged commit 5ca5820 into txpipe:main Jan 27, 2025
2 checks passed
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.

2 participants