jobsets and folders
Former-commit-id: 42d81df7327918aaace728aad803162144734be5
This commit is contained in:
@@ -6,13 +6,21 @@ use std::net::IpAddr;
|
||||
#[derive(Default, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct WUnit {
|
||||
pub id: Uuid,
|
||||
pub jobset: String,
|
||||
pub description: WDesc,
|
||||
pub status: EStatus
|
||||
}
|
||||
impl WUnit {
|
||||
pub fn new(id: Uuid, description: WDesc) -> Self {
|
||||
pub fn new(id: Uuid, _jobset: String, description: WDesc) -> Self {
|
||||
let jobset: String = _jobset.chars()
|
||||
.map(|x| match x {
|
||||
'.' => '_',
|
||||
'/' => '-',
|
||||
_ => x
|
||||
}).collect();
|
||||
WUnit {
|
||||
id: id,
|
||||
jobset: jobset,
|
||||
description: description,
|
||||
status: EStatus::Queued
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user