Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

persistent tailer #14

Open
Rockyyost opened this issue Nov 16, 2014 · 0 comments
Open

persistent tailer #14

Rockyyost opened this issue Nov 16, 2014 · 0 comments

Comments

@Rockyyost
Copy link

Is there an example of how to use the persistent tailer?

I'm trying to use and I've got it creating the collection to store the tail, however, it only updates the tail when I start tailing the ops log. It does not appear to be writing to the trail collection while tailing.

Here's how I've written it so far... Thanks!

client = Mongo::MongoClient.from_uri([DATABASE STUFF])
outlet = Mongoriver::OplogWatcher.new
config = client['admin'].command(:ismaster => 1)
persistent_tailer = Mongoriver::PersistentTailer.new([client], :existing, config['setName'], {:db => database, :save_frequency => 15})

stream = Mongoriver::Stream.new(persistent_tailer, outlet)

stream.run_forever()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant