kolyasya:oplog-keep-awake

v0.0.4Published 11 months ago

kolyasya:oplog-keep-awake — Keeps Mongo Oplog awake by upserting values on interval

Depends on meteor-synced-cron

To make it work properly you need to use meteor-synced-cron in your project

Installation:

meteor add kolyasya:oplog-keep-awake

Package settings:

1{
2  // ...regular Meteor settings.json file...
3
4  packages: {
5
6    // ...other packages settings...,
7
8    "kolyasya:oplog-keep-awake": {
9      // Mongo collection name to store single entry
10      keepAwakeCollectionName: 'keepAwake',
11
12      // Interval in seconds when the entry will be updated
13      keepAwakeUpsertIntervalSeconds: 120,
14    }
15  }
16}

Usage example:

Check ./example directory

1import initOplogKeepAwake from 'meteor/kolyasya:oplog-keep-awake';
2
3Meteor.startup(() => {
4  initOplogKeepAwake();
5
6  SyncedCron.start();
7});