Include projectname in job output
[candle] / src / main / cli.lisp
index b5fc2980a651690d4387877da815fe325c400aad..bacd1e3d62c7d15a6ede410728b02b0e84fb24a9 100644 (file)
  (error-and-exit "Unknown command '~(~A~)'.  See 'candle --help'.~%" command))
 
 (defun job-info->line (job-info)
- (format nil "~A (~A) ~A"
-  (subseq (first job-info) 0 8)
+ (format nil "~A:~A (~A) ~A"
+  (first job-info)
+  (subseq (second job-info) 0 8)
   (format nil "~{~2,,,'0@A/~2,,,'0@A/~A ~2,,,'0@A:~2,,,'0@A~}"
-   (utils:time-as-list (third job-info) :month :date :year :hr :min))
-  (case (second job-info)
+   (utils:time-as-list (fourth job-info) :month :date :year :hr :min))
+  (case (third job-info)
    (:succeeded (format nil "~c[1;32mPassed~c[0m" #\Esc #\Esc))
    (:failed (format nil "~c[1;31mFailed~c[0m" #\Esc #\Esc))
    (:queued "In queue")
       (format t (format nil "~~~A@A: ~~A~~%" width)
        (first branch-info)
        (job-info->line (second branch-info))))
-     (sort branch-infos #'< :key (lambda (branch-info) (third (second branch-info)))))))))
+     (sort branch-infos #'< :key (lambda (branch-info) (fourth (second branch-info)))))))))
 
 (defun refresh-project (args)
  (let
    (format t "~{~A~%~}"
     (mapcar
      #'job-info->line
-     (sort (communication:query `(candle:project-job-information ,(opera:option-argument :project parsed-options))) #'< :key #'third))))))
+     (sort (communication:query `(candle:project-job-information ,(opera:option-argument :project parsed-options))) #'< :key #'fourth))))))
 
 (defun decompose-job-definition (job-definition)
  (let