[Draft] Implement Reviewer Notice Link using Login Redirect #40
6 changed files with 11 additions and 47 deletions
remove listenfd as it is no longer recommended
- was previously recommended for testing purposes to prevent problems of still blocked sockets when restarting quickly
commit
13c732d1cd
18
Cargo.lock
generated
18
Cargo.lock
generated
|
|
@ -1351,7 +1351,6 @@ dependencies = [
|
||||||
"http",
|
"http",
|
||||||
"ldap3",
|
"ldap3",
|
||||||
"lettre",
|
"lettre",
|
||||||
"listenfd",
|
|
||||||
"log",
|
"log",
|
||||||
"mime_guess",
|
"mime_guess",
|
||||||
"multipart_helper",
|
"multipart_helper",
|
||||||
|
|
@ -1504,17 +1503,6 @@ version = "0.1.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
|
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "listenfd"
|
|
||||||
version = "1.0.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "14e4fcc00ff6731d94b70e16e71f43bda62883461f31230742e3bc6dddf12988"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"uuid",
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "local-channel"
|
name = "local-channel"
|
||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
|
|
@ -2668,12 +2656,6 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "uuid"
|
|
||||||
version = "1.2.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vcpkg"
|
name = "vcpkg"
|
||||||
version = "0.2.15"
|
version = "0.2.15"
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ lettre = { workspace = true, default-features = false, features = ["sendmail-tra
|
||||||
# use rustls a native tls library rather than openssl,
|
# use rustls a native tls library rather than openssl,
|
||||||
# as depending on c dependencies can get annoying even when vendoring
|
# as depending on c dependencies can get annoying even when vendoring
|
||||||
ldap3 = { workspace = true, default-features = false, features = ["tls-rustls"] }
|
ldap3 = { workspace = true, default-features = false, features = ["tls-rustls"] }
|
||||||
listenfd = { workspace = true }
|
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
mime_guess = { workspace = true }
|
mime_guess = { workspace = true }
|
||||||
multipart_helper = { workspace = true }
|
multipart_helper = { workspace = true }
|
||||||
|
|
|
||||||
BIN
packages/jobboerse/THIRDPARTY.toml
(Stored with Git LFS)
BIN
packages/jobboerse/THIRDPARTY.toml
(Stored with Git LFS)
Binary file not shown.
|
|
@ -74,10 +74,6 @@ pub(crate) enum SeverInitializationError {
|
||||||
TemplateError(#[from] handlebars::TemplateError),
|
TemplateError(#[from] handlebars::TemplateError),
|
||||||
#[error("the jobboerse server encountered a fatal io error during startup, could not bind socket: {0}")]
|
#[error("the jobboerse server encountered a fatal io error during startup, could not bind socket: {0}")]
|
||||||
Bind(std::io::Error),
|
Bind(std::io::Error),
|
||||||
#[error("the jobboerse server encountered a fatal io error during startup, could not listen on socket: {0}")]
|
|
||||||
TakeListen(std::io::Error),
|
|
||||||
#[error("the jobboerse server encountered a fatal io error during startup, could not take listen socket: {0}")]
|
|
||||||
Listen(std::io::Error),
|
|
||||||
#[error("the jobboerse server encountered a fatal io error during startup, could not start the server: {0}")]
|
#[error("the jobboerse server encountered a fatal io error during startup, could not start the server: {0}")]
|
||||||
Run(std::io::Error),
|
Run(std::io::Error),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ use actix_web::middleware::{ErrorHandlers, NormalizePath, TrailingSlash};
|
||||||
use actix_web::{get, web, App, HttpServer};
|
use actix_web::{get, web, App, HttpServer};
|
||||||
use error::SeverInitializationError;
|
use error::SeverInitializationError;
|
||||||
use handlebars::Handlebars;
|
use handlebars::Handlebars;
|
||||||
use listenfd::ListenFd;
|
|
||||||
use log::{error, LevelFilter, SetLoggerError};
|
use log::{error, LevelFilter, SetLoggerError};
|
||||||
// internal imports
|
// internal imports
|
||||||
use job_offers::lease::SubmissionLimiter;
|
use job_offers::lease::SubmissionLimiter;
|
||||||
|
|
@ -65,8 +64,6 @@ async fn main() -> Result<(), error::SeverInitializationError> {
|
||||||
async fn run() -> Result<(), error::SeverInitializationError> {
|
async fn run() -> Result<(), error::SeverInitializationError> {
|
||||||
let server_config = ServerConfig::load().await?;
|
let server_config = ServerConfig::load().await?;
|
||||||
|
|
||||||
let mut listen_fd = ListenFd::from_env();
|
|
||||||
|
|
||||||
let mut hb = Handlebars::new();
|
let mut hb = Handlebars::new();
|
||||||
let bundle =
|
let bundle =
|
||||||
bundle_licenses_lib::format::Format::Toml.deserialize_from_reader(route::LICENSE_BUNDLE)?;
|
bundle_licenses_lib::format::Format::Toml.deserialize_from_reader(route::LICENSE_BUNDLE)?;
|
||||||
|
|
@ -151,19 +148,12 @@ async fn run() -> Result<(), error::SeverInitializationError> {
|
||||||
app
|
app
|
||||||
});
|
});
|
||||||
|
|
||||||
if let Some(l) = listen_fd
|
let ipv6 = SocketAddr::from((Ipv6Addr::UNSPECIFIED, port));
|
||||||
.take_tcp_listener(0)
|
let ipv4 = SocketAddr::from((Ipv4Addr::UNSPECIFIED, port));
|
||||||
.map_err(SeverInitializationError::TakeListen)?
|
|
||||||
{
|
|
||||||
server.listen(l).map_err(SeverInitializationError::Listen)?
|
|
||||||
} else {
|
|
||||||
let ipv6 = SocketAddr::from((Ipv6Addr::UNSPECIFIED, port));
|
|
||||||
let ipv4 = SocketAddr::from((Ipv4Addr::UNSPECIFIED, port));
|
|
||||||
|
|
||||||
server
|
server
|
||||||
.bind([ipv6, ipv4].as_slice())
|
.bind([ipv6, ipv4].as_slice())
|
||||||
.map_err(SeverInitializationError::Bind)?
|
.map_err(SeverInitializationError::Bind)?
|
||||||
}
|
|
||||||
.run()
|
.run()
|
||||||
.await
|
.await
|
||||||
.map_err(SeverInitializationError::Run)?;
|
.map_err(SeverInitializationError::Run)?;
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,8 @@ RUN_DIR="${DIR}/../packages/jobboerse"
|
||||||
|
|
||||||
pushd "${RUN_DIR}"
|
pushd "${RUN_DIR}"
|
||||||
|
|
||||||
systemfd \
|
cargo watch \
|
||||||
--no-pid \
|
-i ./packages/jobboerse/config/dev-config.toml \
|
||||||
-s http::8080 \
|
-x "run --package jobboerse --bin jobboerse --release --features=dev_mode -- --config=\"${CFG}\" --mode=development"
|
||||||
-- cargo watch \
|
|
||||||
-i ./packages/jobboerse/config/dev-config.toml \
|
|
||||||
-x "run --package jobboerse --bin jobboerse --release --features=dev_mode -- --config=\"${CFG}\" --mode=development"
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue