Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions source/event_hub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// :copyright: Copyright (c) 2016 ftrack
import { v4 as uuidV4 } from "uuid";
import loglevel from "loglevel";
import io from "./simple_socketio.js";
import { Event } from "./event.js";
import {
EventServerConnectionTimeoutError,
Expand All @@ -9,7 +10,7 @@ import {
NotUniqueError,
} from "./error.js";
import { Data } from "./types.js";
import type io from "./simple_socketio.js";

interface BaseActionData {
selection: Array<{
entityId: string;
Expand Down Expand Up @@ -177,9 +178,7 @@ export class EventHub {
}

/** Connect to the event server. */
async connect(): Promise<void> {
const simple_socketio = await import("./simple_socketio.js");
const io = simple_socketio.default;
connect(): void {
this._socketIo = io.connect(this._serverUrl, this._apiUser, this._apiKey);
this._socketIo.on("connect", this._onSocketConnected);
this._socketIo.on("ftrack.event", this._handle);
Expand Down