Skip to content

Commit

Permalink
Rm hardcoded checkpoint (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
ameyc committed Nov 13, 2024
1 parent b6d7a6b commit 3df33e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions py-denormalized/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ impl PyContext {
#[new]
pub fn new(py: Python) -> PyResult<Self> {
let rt = &get_tokio_runtime(py).0;
let fut: JoinHandle<denormalized::common::error::Result<Context>> = rt.spawn(async move {
Ok(Context::new()?
.with_slatedb_backend(String::from("/tmp/checkpoints/simple-agg-checkpoint-1"))
.await)
});
let fut: JoinHandle<denormalized::common::error::Result<Context>> =
rt.spawn(async move { Ok(Context::new()?) });

let context = wait_for_future(py, fut).map_err(py_denormalized_err)??;

Expand Down
2 changes: 1 addition & 1 deletion py-denormalized/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tokio::runtime::Runtime;

/// Utility to get the Tokio Runtime from Python
pub(crate) fn get_tokio_runtime(py: Python) -> PyRef<TokioRuntime> {
let datafusion = py.import_bound("denormalized._internal").unwrap();
let datafusion = py.import_bound("denormalized._d_internal").unwrap();
let tmp = datafusion.getattr("runtime").unwrap();
match tmp.extract::<PyRef<TokioRuntime>>() {
Ok(runtime) => runtime,
Expand Down

0 comments on commit 3df33e2

Please sign in to comment.