@@ -23,29 +23,37 @@ def get_sql
2323 a.status as audit_status,
2424 case
2525 when a.status in ('size-mismatch','digest-mismatch', 'unverified') then 'Audit Failed'
26- when ifnull(verified, o.modified) < date_add(o.modified, interval #{ @wait_hours } hour) and o.modified > date_add(now(), interval -#{ @wait_hours } hour) then 'Reset Later'
27- when a.status = 'verified' and ifnull(verified, o.modified) < date_add(o.modified, interval #{ @wait_hours } hour) then 'Reset Needed'
26+ when ifnull(verified, o.modified) < date_add(o.modified, interval #{ @wait_hours } hour)
27+ and o.modified > date_add(now(), interval -#{ @wait_hours } hour)
28+ then 'Reset Later'
29+ when a.status = 'verified'
30+ and ifnull(verified, o.modified) < date_add(o.modified, interval #{ @wait_hours } hour)
31+ then 'Reset Needed'
2832 when a.status = 'verified' then 'Audited'
2933 else 'In Progress'
3034 end as category,
3135 case
3236 when a.status in ('size-mismatch','digest-mismatch', 'unverified') then 'FAIL'
33- when ifnull(verified, o.modified) < date_add(o.modified, interval #{ @wait_hours } hour) and o.modified > date_add(now(), interval -#{ @wait_hours } hour) then 'INFO'
34- when a.status = 'verified' and ifnull(verified, o.modified) < date_add(o.modified, interval #{ @wait_hours } hour) then 'WARN'
37+ when ifnull(verified, o.modified) < date_add(o.modified, interval #{ @wait_hours } hour)
38+ and o.modified > date_add(now(), interval -#{ @wait_hours } hour)
39+ then 'INFO'
40+ when a.status = 'verified'
41+ and ifnull(verified, o.modified) < date_add(o.modified, interval #{ @wait_hours } hour)
42+ then 'WARN'
3543 when a.status = 'verified' then 'PASS'
3644 else 'INFO'
3745 end as status
38- from
46+ from
3947 inv.inv_objects o
4048 right join
41- inv.inv_audits a
42- on
43- a.inv_object_id = o.id
44- and
49+ inv.inv_audits a
50+ on
51+ a.inv_object_id = o.id
52+ and
4553 a.inv_node_id = 16 /*sdsc node*/
46- where
54+ where
4755 o.inv_owner_id=14 /*ucb owner*/
48- and
56+ and
4957 o.modified > date_add(now(), interval -#{ @days . to_i } day)
5058 group by
5159 o.id,
0 commit comments