From 4ec46c08dfb9a2124b90ab6bcf9c5cb32d2737b7 Mon Sep 17 00:00:00 2001 From: bokuweb Date: Wed, 1 Jul 2020 10:52:07 +0900 Subject: [PATCH] fix: Fix uuid by env variable (#15) --- raiden/src/id_generator/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/raiden/src/id_generator/mod.rs b/raiden/src/id_generator/mod.rs index dd5b8d07..af843fda 100644 --- a/raiden/src/id_generator/mod.rs +++ b/raiden/src/id_generator/mod.rs @@ -1,7 +1,10 @@ pub trait IdGenerator { #[cfg(not(test))] fn gen() -> String { - uuid::Uuid::new_v4().to_string() + match std::env::var("RAIDEN_UUID_FIXED_BY") { + Ok(v) => v, + Err(_) => uuid::Uuid::new_v4().to_string(), + } } #[cfg(test)] @@ -9,4 +12,3 @@ pub trait IdGenerator { "01234567-89ab-cdef-0123-456789abcdef".to_owned() } } -