Skip to content

Commit

Permalink
feat(ds, pb): move to edge
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterPtato committed Jan 28, 2025
1 parent b85c8c8 commit 176d520
Show file tree
Hide file tree
Showing 1,919 changed files with 55 additions and 15 deletions.
5 changes: 5 additions & 0 deletions packages/common/chirp-workflow/core/src/ctx/activity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ impl ActivityCtx {
self.conn.clickhouse().await
}

/// Access the SQLite database for this workflow. This cannot access any other database.
pub async fn sqlite(&self) -> Result<SqlitePool, rivet_pools::Error> {
self.conn.sqlite(format!("{}-data", self.workflow_id)).await
}

// Backwards compatibility
pub fn op_ctx(&self) -> &rivet_operation::OperationContext<()> {
&self.op_ctx
Expand Down
4 changes: 4 additions & 0 deletions packages/common/connection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ impl Connection {
self.pools.redis("ephemeral")
}

pub async fn sqlite(&self, key: impl AsRef<str>) -> Result<SqlitePool, rivet_pools::Error> {
self.pools.sqlite(key).await
}

pub fn perf(&self) -> &chirp_perf::PerfCtx {
self.client.perf()
}
Expand Down
1 change: 1 addition & 0 deletions packages/common/operation/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ where
self.conn.cache_handle()
}

/// Used by compat layer for chirp workflow.
pub fn pools(&self) -> &rivet_pools::Pools {
self.conn.pools()
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 176d520

Please sign in to comment.