15 lines
321 B
JavaScript
15 lines
321 B
JavaScript
'use strict';
|
|
|
|
const ps = require('./pubsub.js');
|
|
const {Torrent} = require('>/models');
|
|
|
|
console.log('here!!!!!!!!!!!!!')
|
|
|
|
setInterval(async function(){
|
|
ps.publish('torrent:server:status', await Torrent.trClient.sessionStats())
|
|
}, 3000);
|
|
|
|
|
|
// ps.subscribe(/./g, function(...args){
|
|
// console.log('event', args);
|
|
// });
|