Project

General

Profile

Architecture #3028 ยป process_select_in_promises_st.patch

Matthieu CERDA, 2012-11-26 19:09

View differences:

techniques/system/common/1.0/promises.st
"$(sys.workdir)/bin/cf-$(binaries)"
process_count => check_range("$(binaries)", "0","$(process_term[$(binaries)])"),
process_select => rudder_minutes_older_than("5"),
signals => { "term" },
classes => if_repaired("$(binaries)_has_gone_wild"),
comment => "Checking if cf-$(binaries) has gone wild";
......
"$(sys.workdir)/bin/cf-$(binaries)"
process_count => check_range("$(binaries)", "0","$(process_kill[$(binaries)])"),
process_select => rudder_minutes_older_than("5"),
signals => { "kill" },
classes => if_repaired("$(binaries)_has_gone_really_wild"),
comment => "Checking if cf-$(binaries) has gone really wild";
......
"cf-$(binaries)"
process_count => check_range("$(binaries)", "0","$(process_term[$(binaries)])"),
process_select => rudder_minutes_older_than("5"),
signals => { "term" },
classes => if_repaired("$(binaries)_has_gone_wild"),
comment => "Checking if cf-$(binaries) has gone wild";
techniques/system/common/1.0/rudder_lib.st
location => start;
}
###################################################
# process_select rudder_minutes_older_than
###################################################
body process_select rudder_minutes_older_than(m)
{
stime_range => irange(ago(0,0,0,0,"$(m)",0),now);
process_result => "stime";
}
    (1-1/1)