Remove old and experimental code
This commit is contained in:
16
src/job.rs
16
src/job.rs
@@ -14,26 +14,17 @@ pub struct Job {
|
|||||||
sender: Option<Sender<BackupEvent>>,
|
sender: Option<Sender<BackupEvent>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
enum JobSide {
|
enum JobSide {
|
||||||
Source,
|
Source,
|
||||||
Destination,
|
Destination,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
struct Snapshot {
|
struct Snapshot {
|
||||||
snapshot: String,
|
snapshot: String,
|
||||||
side: JobSide,
|
side: JobSide,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Job {
|
impl Job {
|
||||||
pub fn dump(&self) {
|
|
||||||
println!("Datasets: {:?}", self.datasets);
|
|
||||||
println!("Target: {}", self.target);
|
|
||||||
println!("Source ZFS Command: {:?}", self.source_zfs_command);
|
|
||||||
println!("Target ZFS Command: {:?}", self.target_zfs_command);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn send_event(&self, event: BackupEvent) {
|
fn send_event(&self, event: BackupEvent) {
|
||||||
if let Some(sender) = &self.sender {
|
if let Some(sender) = &self.sender {
|
||||||
sender.send(event).ok();
|
sender.send(event).ok();
|
||||||
@@ -386,13 +377,6 @@ impl JobBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct JobConfig {
|
|
||||||
sources: Vec<String>,
|
|
||||||
target: String,
|
|
||||||
source_zfs_command: Option<String>,
|
|
||||||
target_zfs_command: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user