mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 17:12:16 +03:00
Abstract MQTT from communication and make mqtt optional (#4462)
* Add option for mqtt config * Setup communication layer * Have a dispatcher which is responsible for handling and sending messages * Move mqtt to communication * Separate ws communications module * Make ws client conform to communicator * Cleanup imports * Migrate to new dispatcher * Clean up * Need to set topic prefix * Remove references to mqtt in dispatcher * Don't start mqtt until dispatcher is subscribed * Cleanup * Shorten package * Formatting * Remove unused * Cleanup * Rename mqtt to ws on web * Fix ws mypy * Fix mypy * Reformat * Cleanup if/else chain * Catch bad set commands
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { h } from 'preact';
|
||||
import * as AutoUpdatingCameraImage from '../../components/AutoUpdatingCameraImage';
|
||||
import * as Mqtt from '../../api/mqtt';
|
||||
import * as WS from '../../api/ws';
|
||||
import Camera from '../Camera';
|
||||
import { set as setData } from 'idb-keyval';
|
||||
import * as JSMpegPlayer from '../../components/JSMpegPlayer';
|
||||
@@ -14,7 +14,7 @@ describe('Camera Route', () => {
|
||||
vi.spyOn(JSMpegPlayer, 'default').mockImplementation(() => {
|
||||
return <div data-testid="mock-jsmpeg" />;
|
||||
});
|
||||
vi.spyOn(Mqtt, 'MqttProvider').mockImplementation(({ children }) => children);
|
||||
vi.spyOn(WS, 'WsProvider').mockImplementation(({ children }) => children);
|
||||
});
|
||||
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
|
||||
Reference in New Issue
Block a user