Skip to content

Commit 10b89a1

Browse files
committed
chore: drop importer from regular API server
1 parent 8a1c8a2 commit 10b89a1

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

Diff for: server/src/profile/api.rs

-18
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ pub struct Run {
5959
#[arg(long, env)]
6060
pub sample_data: bool,
6161

62-
/// Run an embedded importer server.
63-
#[arg(long, env = "TRUSTD_WITH_IMPORTER", default_value_t = false)]
64-
pub with_importer: bool,
65-
6662
/// Allows enabling the GraphQL endpoint
6763
#[arg(long, env = "TRUSTD_WITH_GRAPHQL", default_value_t = false)]
6864
pub with_graphql: bool,
@@ -72,10 +68,6 @@ pub struct Run {
7268
#[arg(long, env)]
7369
pub embedded_oidc: bool,
7470

75-
/// The importer working directory
76-
#[arg(long, env)]
77-
pub working_dir: Option<PathBuf>,
78-
7971
/// The size limit of SBOMs, uncompressed.
8072
#[arg(
8173
long,
@@ -174,9 +166,7 @@ struct InitData {
174166
#[cfg(feature = "garage-door")]
175167
embedded_oidc: Option<embedded_oidc::EmbeddedOidc>,
176168
ui: UI,
177-
working_dir: Option<PathBuf>,
178169
with_graphql: bool,
179-
with_importer: bool,
180170
config: ModuleConfig,
181171
}
182172

@@ -309,9 +299,7 @@ impl InitData {
309299
#[cfg(feature = "garage-door")]
310300
embedded_oidc,
311301
ui,
312-
working_dir: run.working_dir,
313302
with_graphql: run.with_graphql,
314-
with_importer: run.with_importer || run.devmode,
315303
})
316304
}
317305

@@ -346,12 +334,6 @@ impl InitData {
346334

347335
let mut tasks = vec![http];
348336

349-
// run the importer, when requested
350-
if self.with_importer {
351-
let importer = async { importer(db, storage, self.working_dir).await }.boxed_local();
352-
tasks.push(importer);
353-
}
354-
355337
// track the embedded OIDC server task
356338
#[cfg(feature = "garage-door")]
357339
if let Some(embedded_oidc) = self.embedded_oidc.take() {

0 commit comments

Comments
 (0)