fix
This commit is contained in:
parent
44f934b4b9
commit
e165919ae9
|
|
@ -12,21 +12,10 @@ export class Watcher {
|
||||||
|
|
||||||
constructor(path: string, id_site: string) {
|
constructor(path: string, id_site: string) {
|
||||||
this.init(path, id_site);
|
this.init(path, id_site);
|
||||||
// watcher.subscribe(path, (err, events) => {
|
|
||||||
// console.log(events);
|
|
||||||
// });
|
|
||||||
// watch(
|
|
||||||
// path,
|
|
||||||
// {
|
|
||||||
// recursive: true,
|
|
||||||
// persistent: true,
|
|
||||||
// },
|
|
||||||
// async (event, filename) => {
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async init(path: string, id_site: string) {
|
async init(path: string, id_site: string) {
|
||||||
|
try {
|
||||||
const broadcastLoading = async () => {
|
const broadcastLoading = async () => {
|
||||||
const client_ids = user.active
|
const client_ids = user.active
|
||||||
.findAll({ site_id: id_site })
|
.findAll({ site_id: id_site })
|
||||||
|
|
@ -82,6 +71,9 @@ export class Watcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async close() {
|
async close() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue