Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Log right this time


Code Block
rule kickoff_new_fuse_instance {
  select when fuse need_fleet
  pre {
    fleet_channel = pds:get_item(common:namespace(),"fleet_channel")
    is_null = fleet_channel.isnull()
    _ = is_null => fleet_channel.klog(">>>>>>>>>>> Not creating new fleet; fleet channel exists: ") | null
  if(is_null) then
    send_directive("requesting new Fuse setup");
  fired {
    raise explicit event "need_new_fleet"
      attributes {
        "_api" : "sky",
        "fleet" : event:attr("fleet") || "My Fleet"
    log warn <<Not creating new fleet; fleet channel exists: #{fleet_channel}" if is_null

The guard rule only continues if the fleet channel is null (evidence that a fleet doesn't already exist).