expose and test set_stock_translation to Python

This commit is contained in:
holger krekel
2019-10-09 10:58:06 +02:00
parent bc86201b44
commit 45f011c63c
10 changed files with 122 additions and 32 deletions

View File

@@ -63,7 +63,7 @@ pub struct Context {
pub running_state: Arc<RwLock<RunningState>>,
/// Mutex to avoid generating the key for the user more than once.
pub generating_key_mutex: Mutex<()>,
pub translated_stockstrings: HashMap<usize, String>,
pub translated_stockstrings: Arc<RwLock<HashMap<usize, String>>>,
}
#[derive(Debug, PartialEq, Eq)]
@@ -146,7 +146,7 @@ impl Context {
probe_imap_network: Arc::new(RwLock::new(false)),
perform_inbox_jobs_needed: Arc::new(RwLock::new(false)),
generating_key_mutex: Mutex::new(()),
translated_stockstrings: HashMap::new(),
translated_stockstrings: Arc::new(RwLock::new(HashMap::new())),
};
ensure!(