Skip to content

Commit

Permalink
Remove process-management feature #324 #334
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Mar 21, 2024
1 parent 4f4a818 commit 5d5140b
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 169 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ By far most changes relate to `atomic-server`, so if not specified, assume the c
**Changes to JS assets (including the front-end and JS libraries) are not shown here**, but in [`/browser/CHANGELOG`](/browser/CHANGELOG.md).
See [STATUS.md](server/STATUS.md) to learn more about which features will remain stable.

## [UNRELEASED]

- Remove `process-management` feature #324 #334

## [v0.37.0] - 2024-02-01

- Refactor `atomic_lib::Resource` propval methods (e.g. `set_propval` => `set`), make them chainable. #822
Expand Down
46 changes: 1 addition & 45 deletions Cargo.lock

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

9 changes: 2 additions & 7 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ default-run = "atomic-server"
description = "Create, share and model Atomic Data with this graph database server. Run atomic-server without any arguments to start the server. Use --help to learn about the options."
edition = "2021"
homepage = "https://atomicserver.eu/"
include = ["src/**/*", "Cargo.toml", "assets_tmp", "build.rs"]
license = "MIT"
name = "atomic-server"
readme = "./README.md"
repository = "https://github.com/atomicdata-dev/atomic-server"
version = "0.37.0"
include = ["src/**/*", "Cargo.toml", "assets_tmp", "build.rs"]

[[bin]]
name = "atomic-server"
path = "src/bin.rs"

[build-dependencies]
dircpy = "0.3.15"
static-files = "0.2"
walkdir = "2"
dircpy = "0.3.15"

[dependencies]
actix = ">= 0.12, < 0.14"
Expand Down Expand Up @@ -74,10 +74,6 @@ version = "0.21.0"
optional = true
version = "0.20.0"

[dependencies.sysinfo]
optional = true
version = "0.30"

[dependencies.actix-web]
features = ["rustls"]
version = "4.4"
Expand Down Expand Up @@ -120,7 +116,6 @@ assert_cmd = "2"
[features]
default = ["https", "telemetry"]
https = ["rustls", "instant-acme", "rcgen", "rustls-pemfile"]
process-management = ["sysinfo"]
telemetry = ["tracing-opentelemetry", "opentelemetry", "opentelemetry-jaeger"]

[lib]
Expand Down
9 changes: 0 additions & 9 deletions server/src/appstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ pub fn init(config: Config) -> AtomicServerResult<AppState> {
tracing::warn!("Development mode is enabled. This will use staging environments for services like LetsEncrypt.");
}

// Check if atomic-server is already running somewhere, and try to stop it. It's not a problem if things go wrong here, so errors are simply logged.
if cfg!(feature = "process-management") {
#[cfg(feature = "process-management")]
{
let _ = crate::process::terminate_existing_processes(&config)
.map_err(|e| tracing::error!("Could not check for running instance: {}", e));
}
}

tracing::info!("Opening database at {:?}", &config.store_path);
let should_init = !&config.store_path.exists() || config.initialize;
let mut store = atomic_lib::Db::init(&config.store_path, config.server_url.clone())?;
Expand Down
2 changes: 0 additions & 2 deletions server/src/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ mod helpers;
#[cfg(feature = "https")]
mod https;
mod jsonerrors;
#[cfg(feature = "process-management")]
mod process;
mod routes;
pub mod serve;
// #[cfg(feature = "search")]
Expand Down
2 changes: 0 additions & 2 deletions server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ mod helpers;
#[cfg(feature = "https")]
mod https;
mod jsonerrors;
#[cfg(feature = "process-management")]
mod process;
mod routes;
pub mod serve;
// #[cfg(feature = "search")]
Expand Down
97 changes: 0 additions & 97 deletions server/src/process.rs

This file was deleted.

7 changes: 0 additions & 7 deletions server/src/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,6 @@ pub async fn serve(config: crate::config::Config) -> AtomicServerResult<()> {
guard.flush()
}

if cfg!(feature = "process-management") {
#[cfg(feature = "process-management")]
{
crate::process::remove_pid(&config)?;
}
}

tracing::info!("Server stopped");
Ok(())
}
Expand Down

0 comments on commit 5d5140b

Please sign in to comment.