Skip to content

Commit

Permalink
Remove task logs on 'pueue remove'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed Mar 21, 2021
1 parent a8b7443 commit 43a26de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Fixed

- Remove task logs on `pueue remove`. [#187](https://github.com/Nukesor/pueue/issues/187)

## [0.12.1] - 12-03-2021

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion client/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ pub enum SubCommand {
quiet: bool,
},

/// Remove all finished tasks from the list (also clears logs).
/// Remove all finished tasks from the list.
Clean {
/// Only clean tasks that finished successfully.
#[clap(short, long)]
Expand Down
3 changes: 3 additions & 0 deletions daemon/network/message_handler/remove.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use pueue_lib::log::clean_log_handles;
use pueue_lib::network::message::*;
use pueue_lib::state::SharedState;
use pueue_lib::task::TaskStatus;
Expand Down Expand Up @@ -28,6 +29,8 @@ pub fn remove(task_ids: Vec<usize>, state: &SharedState) -> Message {

for task_id in &not_running {
state.tasks.remove(task_id);

clean_log_handles(*task_id, &state.settings.shared.pueue_directory);
}

let text = "Tasks removed from list";
Expand Down

0 comments on commit 43a26de

Please sign in to comment.