Hi,

I've tried to add a ifelapsed constraint on files selection, and it 
seems it doesn't do anything...

test.cf :
body common control {
  bundlesequence => { "list_new_files"};
}

bundle agent list_new_files {
 files:
    "/home/nicolas/test"  
         file_select => by_dates,
         transformer => "/bin/echo $(this.promiser)",
     action => my_delay;   
}

body file_select by_dates
{
    ctime => irange(ago(0,0,0,1,0,0),now);
         file_result => "ctime";
}

body action my_delay
{
    ifelapsed => "60";
}

# cf-agent -v -f ./test.cf
cf3     Promise handle:
cf3     Promise made by: /home/nicolas/test
cf3     .........................................................
cf3
cf3  -> Using literal pathtype for /home/nicolas/test
cf3  -> Handling file existence constraints on /home/nicolas/test
cf3 Transforming: /bin/echo /home/nicolas/test
cf3 /home/nicolas/test
cf3 Transformer /home/nicolas/test => /bin/echo /home/nicolas/test seemed ok
cf3  -> Handling file existence constraints on /home/nicolas/test
cf3 Transforming: /bin/echo /home/nicolas/test
cf3 /home/nicolas/test
cf3 Transformer /home/nicolas/test => /bin/echo /home/nicolas/test seemed ok


And all successives runs do the same. I would have expect a
 XX Nothing promised here [lock.list_new_files.file_select] (4/60 
minutes elapsed)


Regards,
Nicolas

_______________________________________________
Bug-cfengine mailing list
Bug-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to