mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 10:54:55 +00:00
Add conditional check for Tuya web socket service
This commit is contained in:
@ -22,11 +22,13 @@ export class TuyaWebSocketService {
|
||||
maxRetryTimes: 100,
|
||||
});
|
||||
|
||||
// Set up event handlers
|
||||
this.setupEventHandlers();
|
||||
if (this.configService.get<string>('tuya-config.TRUN_ON_TUYA_SOCKET')) {
|
||||
// Set up event handlers
|
||||
this.setupEventHandlers();
|
||||
|
||||
// Start receiving messages
|
||||
this.client.start();
|
||||
// Start receiving messages
|
||||
this.client.start();
|
||||
}
|
||||
}
|
||||
|
||||
private setupEventHandlers() {
|
||||
|
||||
Reference in New Issue
Block a user