diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-04-09 11:33:14 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-04-09 12:05:55 +0200 |
commit | 66e8826465cc51ceb723223a6ec567ee5543a20b (patch) | |
tree | cfc848dfbae036cc9c3ad4683852489396b20afa | |
parent | 56a0036cb55fad022c05b961563b46d1c284e02d (diff) |
Add debug output
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r-- | src/commands/db.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commands/db.rs b/src/commands/db.rs index 5961c77..7dbf08a 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -24,6 +24,7 @@ use diesel::JoinOnDsl; use diesel::QueryDsl; use diesel::RunQueryDsl; use itertools::Itertools; +use log::debug; use log::info; use crate::config::Configuration; @@ -324,6 +325,7 @@ fn jobs(conn_cfg: DbConnectionConfig, matches: &ArgMatches) -> Result<()> { // If we get a filter for environment on CLI, we fetch all job ids that are associated with the // passed environment variables and make `sel` filter for those. let sel = if let Some((name, val)) = matches.value_of("env_filter").map(crate::util::env::parse_to_env).transpose()? { + debug!("Filtering for ENV: {} = {}", name, val); let jids = schema::envvars::table .filter({ use crate::diesel::BoolExpressionMethods; @@ -334,6 +336,7 @@ fn jobs(conn_cfg: DbConnectionConfig, matches: &ArgMatches) -> Result<()> { .select(schema::job_envs::job_id) .load::<i32>(&conn)?; + debug!("Filtering for these IDs (because of env filter): {:?}", jids); sel.filter(schema::jobs::dsl::id.eq_any(jids)) } else { sel |