Skip to content
Draft
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: 6 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/bin/ampd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ clap.workspace = true
common = { path = "../../core/common" }
console-subscriber = { version = "0.5.0", default-features = false, optional = true }
controller = { path = "../../services/controller" }
js-runtime = { path = "../../core/js-runtime" }
metadata-db = { path = "../../core/metadata-db" }
metadata-db-postgres = { path = "../../services/metadata-db-postgres" }
monitoring = { path = "../../core/monitoring" }
Expand Down
2 changes: 2 additions & 0 deletions crates/bin/ampd/src/server_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ pub async fn run(
None
};

let isolate_pool = js_runtime::isolate_pool::IsolatePool::new();
let (addrs, server) = server::service::new(
Arc::new(server_config),
metadata_db,
data_store,
datasets_cache,
ethcall_udfs_cache,
isolate_pool,
meter,
flight_at,
jsonl_at,
Expand Down
5 changes: 5 additions & 0 deletions crates/bin/ampd/src/solo_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,14 @@ pub async fn run(
};

let server_config = server_cmd::config_from_common(&config);
let server_isolate_pool = js_runtime::isolate_pool::IsolatePool::new();
let (addrs, fut) = server::service::new(
Arc::new(server_config),
metadata_db.clone(),
data_store.clone(),
datasets_cache.clone(),
ethcall_udfs_cache.clone(),
server_isolate_pool,
meter.clone(),
flight_at,
jsonl_at,
Expand All @@ -178,13 +180,16 @@ pub async fn run(

// Initialize worker
let worker_config = worker_cmd::config_from_common(&config);
let isolate_pool = js_runtime::isolate_pool::IsolatePool::new();

let worker_fut = worker::service::new(
worker_config,
build_info,
metadata_db,
data_store,
datasets_cache,
ethcall_udfs_cache,
isolate_pool,
meter,
worker_id,
None, // Use config-based event emitter
Expand Down
3 changes: 3 additions & 0 deletions crates/bin/ampd/src/worker_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,16 @@ pub async fn run(
let worker_config = config_from_common(&config);

// Initialize the worker (setup phase)
let isolate_pool = js_runtime::isolate_pool::IsolatePool::new();

let worker_fut = worker::service::new(
worker_config,
build_info,
metadata_db,
data_store,
datasets_cache,
ethcall_udfs_cache,
isolate_pool,
meter,
node_id,
None, // Use config-based event emitter
Expand Down
11 changes: 1 addition & 10 deletions crates/core/common/src/amp_catalog_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use datasets_common::{
hash_reference::HashReference, partial_reference::PartialReference, reference::Reference,
};
use datasets_derived::deps::SELF_REF_KEYWORD;
use js_runtime::isolate_pool::IsolatePool;

use crate::{
dataset_schema_provider::DatasetSchemaProvider,
Expand Down Expand Up @@ -53,7 +52,6 @@ pub const AMP_CATALOG_NAME: &str = "amp";
pub struct AmpCatalogProvider {
datasets_cache: DatasetsCache,
ethcall_udfs_cache: EthCallUdfsCache,
isolate_pool: IsolatePool,
/// Optional dependency alias overrides. When set, bare names matching
/// a key are resolved directly to the corresponding [`HashReference`]
/// instead of going through `PartialReference` → `Reference` → `resolve_revision`.
Expand All @@ -65,15 +63,10 @@ pub struct AmpCatalogProvider {

impl AmpCatalogProvider {
/// Creates a new catalog provider.
pub fn new(
datasets_cache: DatasetsCache,
ethcall_udfs_cache: EthCallUdfsCache,
isolate_pool: IsolatePool,
) -> Self {
pub fn new(datasets_cache: DatasetsCache, ethcall_udfs_cache: EthCallUdfsCache) -> Self {
Self {
datasets_cache,
ethcall_udfs_cache,
isolate_pool,
dep_aliases: Default::default(),
self_schema: None,
}
Expand Down Expand Up @@ -127,7 +120,6 @@ impl AmpCatalogProvider {
name.to_string(),
dataset,
self.ethcall_udfs_cache.clone(),
self.isolate_pool.clone(),
));
return Ok(Some(provider));
}
Expand Down Expand Up @@ -158,7 +150,6 @@ impl AmpCatalogProvider {
name.to_string(),
dataset,
self.ethcall_udfs_cache.clone(),
self.isolate_pool.clone(),
));
Ok(Some(provider))
}
Expand Down
Loading
Loading