summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli.rs10
-rw-r--r--src/commands/db.rs4
2 files changed, 14 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 6da612e..cdf35d3 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -303,6 +303,16 @@ pub fn cli<'a>() -> App<'a> {
.about("Only show jobs from ENDPOINT")
)
+ .arg(Arg::new("package")
+ .required(false)
+ .multiple(false)
+ .long("package")
+ .short('p')
+ .takes_value(true)
+ .value_name("PKG")
+ .about("Only show jobs for PKG")
+ )
+
)
.subcommand(App::new("job")
diff --git a/src/commands/db.rs b/src/commands/db.rs
index a296579..08ed6c8 100644
--- a/src/commands/db.rs
+++ b/src/commands/db.rs
@@ -461,6 +461,10 @@ fn jobs(conn_cfg: DbConnectionConfig<'_>, matches: &ArgMatches) -> Result<()> {
sel = sel.filter(schema::endpoints::name.eq(ep_name))
}
+ if let Some(pkg_name) = matches.value_of("package") {
+ sel = sel.filter(schema::packages::name.eq(pkg_name))
+ }
+
let data = sel
.order_by(schema::jobs::id.desc()) // required for the --limit implementation
.load::<(models::Job, models::Submit, models::Endpoint, models::Package)>(&conn)?