Sha256: acb683108a6f8f3e716e0fe04948a26b5b5c1865d53407af85592bc1d4b0a7bd

Contents?: true

Size: 630 Bytes

Versions: 5

Compression:

Stored size: 630 Bytes

Contents

# We can use communicator to interact with XMPP server
#
# Find all top level pubsub nodes
host = "pubsub.#{OmfCommon.comm.jid.domain}"

def discover
  OmfCommon.comm.discover('items', host, '') do |m|
    m.items.each { |i| info i.node }
    info "Found #{m.items.size} items"
  end
end


def cleanup
  OmfCommon.comm.affiliations do |a|
    if a[:owner]
      info "Found #{a[:owner].size} owned topics"
      info "Now cleaning up..."
      a[:owner].each do |t|
        OmfCommon.comm.delete_topic(t) do |m|
          debug m
        end
      end
    else
      info "Found no owned topics"
    end
  end
end

cleanup

done!

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
omf_ec-6.0.2.pre.2 example/test_exp/test00.rb
omf_ec-6.0.2.pre.1 example/test_exp/test00.rb
omf_ec-6.0.1 example/test_exp/test00.rb
omf_ec-6.0.0 example/test_exp/test00.rb
omf_ec-6.0.0.pre.5 example/test_exp/test00.rb