finalize server-side plugin system #8
2 changed files with 15 additions and 8 deletions
pinakes-server: update tests with plugin configuration
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I320426c6b2cc9119a44570b4534e08d66a6a6964
commit
ce9c27d410
|
|
@ -186,6 +186,7 @@ async fn setup_app() -> axum::Router {
|
|||
cache: Arc::new(CacheLayer::new(60)),
|
||||
scheduler: Arc::new(scheduler),
|
||||
plugin_manager: None,
|
||||
plugin_pipeline: None,
|
||||
transcode_service: None,
|
||||
managed_storage: None,
|
||||
chunked_upload_manager: None,
|
||||
|
|
@ -262,6 +263,7 @@ async fn setup_app_with_auth() -> (axum::Router, String, String, String) {
|
|||
cache: Arc::new(CacheLayer::new(60)),
|
||||
scheduler: Arc::new(scheduler),
|
||||
plugin_manager: None,
|
||||
plugin_pipeline: None,
|
||||
transcode_service: None,
|
||||
managed_storage: None,
|
||||
chunked_upload_manager: None,
|
||||
|
|
|
|||
|
|
@ -68,14 +68,18 @@ async fn setup_app_with_plugins()
|
|||
std::fs::create_dir_all(&cache_dir).expect("create cache dir");
|
||||
|
||||
let plugin_config = PluginsConfig {
|
||||
enabled: true,
|
||||
data_dir: data_dir.clone(),
|
||||
cache_dir: cache_dir.clone(),
|
||||
plugin_dirs: vec![],
|
||||
enable_hot_reload: false,
|
||||
allow_unsigned: true,
|
||||
max_concurrent_ops: 2,
|
||||
plugin_timeout_secs: 10,
|
||||
enabled: true,
|
||||
data_dir: data_dir.clone(),
|
||||
cache_dir: cache_dir.clone(),
|
||||
plugin_dirs: vec![],
|
||||
enable_hot_reload: false,
|
||||
allow_unsigned: true,
|
||||
max_concurrent_ops: 2,
|
||||
plugin_timeout_secs: 10,
|
||||
timeouts:
|
||||
pinakes_core::config::PluginTimeoutConfig::default(),
|
||||
max_consecutive_failures: 5,
|
||||
trusted_keys: vec![],
|
||||
};
|
||||
|
||||
let plugin_manager =
|
||||
|
|
@ -145,6 +149,7 @@ async fn setup_app_with_plugins()
|
|||
cache: Arc::new(CacheLayer::new(60)),
|
||||
scheduler: Arc::new(scheduler),
|
||||
plugin_manager: Some(plugin_manager.clone()),
|
||||
plugin_pipeline: None,
|
||||
transcode_service: None,
|
||||
managed_storage: None,
|
||||
chunked_upload_manager: None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue