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

Rm hardcoded checkpoint #55

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading