Skip to content

Commit e3398c6

Browse files
committed
wip
1 parent 25b8c61 commit e3398c6

File tree

4 files changed

+9
-62
lines changed

4 files changed

+9
-62
lines changed

meteor/server/api/deviceTriggers/StudioDeviceTriggerManager.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import { SomeAction, SomeBlueprintTrigger } from '@sofie-automation/blueprints-i
3030
import { DeviceActions } from '@sofie-automation/shared-lib/dist/core/model/ShowStyle'
3131
import { DummyReactiveVar } from '@sofie-automation/meteor-lib/dist/triggers/reactive-var'
3232
import { MeteorTriggersContext } from './triggersContext'
33-
import { Tracker } from 'meteor/tracker'
34-
import { TriggerTrackerComputation } from '@sofie-automation/meteor-lib/dist/triggers/triggersContext'
3533

3634
export class StudioDeviceTriggerManager {
3735
#lastShowStyleBaseId: ShowStyleBaseId | null = null
@@ -45,11 +43,7 @@ export class StudioDeviceTriggerManager {
4543
StudioActionManagers.set(studioId, new StudioActionManager())
4644
}
4745

48-
async updateTriggers(
49-
cache: ContentCache,
50-
showStyleBaseId: ShowStyleBaseId,
51-
computation: Tracker.Computation | null
52-
): Promise<void> {
46+
async updateTriggers(cache: ContentCache, showStyleBaseId: ShowStyleBaseId): Promise<void> {
5347
const studioId = this.studioId
5448
this.#lastShowStyleBaseId = showStyleBaseId
5549

@@ -171,10 +165,7 @@ export class StudioDeviceTriggerManager {
171165

172166
addedPreviewIds.push(adLibPreviewId)
173167
} else {
174-
const previewedAdLibs = await thisAction.preview(
175-
context,
176-
computation as any as TriggerTrackerComputation | null
177-
)
168+
const previewedAdLibs = await thisAction.preview(context, null)
178169

179170
previewedAdLibs.forEach((adLib) => {
180171
const adLibPreviewId = protectString<PreviewWrappedAdLibId>(

meteor/server/api/deviceTriggers/observer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ MeteorStartupAsync(async () => {
4444
const manager = new StudioDeviceTriggerManager(studioId)
4545
const observer = new StudioObserver(studioId, (showStyleBaseId, cache) => {
4646
workInQueue(async () => {
47-
await manager.updateTriggers(cache, showStyleBaseId, null)
47+
await manager.updateTriggers(cache, showStyleBaseId)
4848
})
4949

5050
return () => {

meteor/server/api/deviceTriggers/triggersContext.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import { MeteorCall } from '../methods'
1010
import { ClientAPI } from '@sofie-automation/meteor-lib/dist/api/client'
1111
import { UserAction } from '@sofie-automation/meteor-lib/dist/userAction'
1212
import { TFunction } from 'i18next'
13-
import { Tracker } from 'meteor/tracker'
14-
1513
import { logger } from '../../logging'
1614
import { IBaseFilterLink, IRundownPlaylistFilterLink } from '@sofie-automation/blueprints-integration'
1715
import { PartId, StudioId } from '@sofie-automation/corelib/dist/dataModel/Ids'
@@ -48,23 +46,19 @@ class MeteorTriggersCollectionWrapper<DBInterface extends { _id: ProtectedString
4846
}
4947

5048
async findFetchAsync(
51-
computation: TriggerTrackerComputation | null,
49+
_computation: TriggerTrackerComputation | null,
5250
selector: any,
5351
options?: any
5452
): Promise<Array<DBInterface>> {
55-
return Tracker.withComputation(computation as Tracker.Computation | null, async () => {
56-
return this.#collection.findFetchAsync(selector, options)
57-
})
53+
return this.#collection.findFetchAsync(selector, options)
5854
}
5955

6056
async findOneAsync(
61-
computation: TriggerTrackerComputation | null,
57+
_computation: TriggerTrackerComputation | null,
6258
selector: any,
6359
options?: any
6460
): Promise<DBInterface | undefined> {
65-
return Tracker.withComputation(computation as Tracker.Computation | null, async () => {
66-
return this.#collection.findOneAsync(selector, options)
67-
})
61+
return this.#collection.findOneAsync(selector, options)
6862
}
6963
}
7064

@@ -102,8 +96,8 @@ export const MeteorTriggersContext: TriggersContext = {
10296
)
10397
},
10498

105-
withComputation: async (computation, func) => {
106-
return Tracker.withComputation(computation as Tracker.Computation | null, func)
99+
withComputation: async (_computation, func) => {
100+
return func()
107101
},
108102

109103
memoizedIsolatedAutorun: async <TArgs extends any[], TRes>(

meteor/server/lib/reactiveMap.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)