2018-08-01 07:03:35 -06:00
|
|
|
import { ResourceName } from "farmbot";
|
2017-11-21 14:48:24 -07:00
|
|
|
import { startTracking } from "../connectivity/data_consistency";
|
2018-09-12 15:09:40 -06:00
|
|
|
import { unpackUUID } from "../util";
|
2017-11-21 07:55:51 -07:00
|
|
|
|
2017-11-21 14:48:24 -07:00
|
|
|
const BLACKLIST: ResourceName[] = [
|
2018-07-20 08:56:38 -06:00
|
|
|
"FbosConfig",
|
|
|
|
"FirmwareConfig",
|
2017-11-21 14:48:24 -07:00
|
|
|
"Image",
|
2018-07-20 08:56:38 -06:00
|
|
|
"Log",
|
|
|
|
"PlantTemplate",
|
|
|
|
"SavedGarden",
|
|
|
|
"SensorReading",
|
2018-01-20 07:46:44 -07:00
|
|
|
"User",
|
|
|
|
"WebAppConfig",
|
2018-07-20 08:56:38 -06:00
|
|
|
"WebcamFeed",
|
2019-04-19 16:04:25 -06:00
|
|
|
"Alert",
|
2019-12-27 11:38:29 -07:00
|
|
|
"Folder",
|
2017-11-21 14:48:24 -07:00
|
|
|
];
|
2017-11-21 07:55:51 -07:00
|
|
|
|
|
|
|
export function maybeStartTracking(uuid: string) {
|
2018-09-12 15:09:40 -06:00
|
|
|
const ignore = BLACKLIST.includes(unpackUUID(uuid).kind);
|
2017-11-21 14:48:24 -07:00
|
|
|
ignore || startTracking(uuid);
|
2017-11-21 07:55:51 -07:00
|
|
|
}
|