import DeviceMap from '../../collections/devicemap';
import { check } from 'meteor/check';


import { Logger } from 'meteor/ostrio:logger';
import { LoggerFile } from 'meteor/ostrio:loggerfile';

var log = new Logger();
(new LoggerFile(log)).enable();

Meteor.publish("devicemaps", function() {

    if (!this.userId) {
        return this.ready();
    }
    Meteor.settings.enableDebug ? log.debug(`devicemapsPublisher => start publish devicemaps `, {}, Meteor.user().username) : '';
    return DeviceMap.find({}, {

        disableOplog: true,
        // pollingThrottleMs: 1000,
        pollingIntervalMs: 1000
    });
});