Skip to content

Commit 97c19b6

Browse files
committed
wip: fix launch
1 parent d85397c commit 97c19b6

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

meteor/server/api/deviceTriggers/RundownContentObserver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ export class RundownContentObserver {
5858

5959
const observer = new RundownContentObserver(onChanged)
6060

61-
await observer.#initObservers(rundownPlaylistId, showStyleBaseId, rundownIds)
61+
await observer.initObservers(rundownPlaylistId, showStyleBaseId, rundownIds)
6262

6363
return observer
6464
}
6565

66-
async #initObservers(
66+
private async initObservers(
6767
rundownPlaylistId: RundownPlaylistId,
6868
showStyleBaseId: ShowStyleBaseId,
6969
rundownIds: RundownId[]

meteor/server/collections/implementations/asyncCollection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ export class WrappedAsyncMongoCollection<DBInterface extends { _id: ProtectedStr
5353
callbacks: PromisifyCallbacks<ObserveChangesCallbacks<DBInterface>>,
5454
options?: FindOptions<DBInterface>
5555
): Promise<Meteor.LiveQueryHandle> {
56-
return this.find(selector as any, options).observeChanges(dePromiseObjectOfFunctions(callbacks))
56+
return this.find(selector as any, options).observeChangesAsync(dePromiseObjectOfFunctions(callbacks))
5757
}
5858

5959
async observe(
6060
selector: MongoQuery<DBInterface> | DBInterface['_id'],
6161
callbacks: PromisifyCallbacks<ObserveCallbacks<DBInterface>>,
6262
options?: FindOptions<DBInterface>
6363
): Promise<Meteor.LiveQueryHandle> {
64-
return this.find(selector as any, options).observe(dePromiseObjectOfFunctions(callbacks))
64+
return this.find(selector as any, options).observeAsync(dePromiseObjectOfFunctions(callbacks))
6565
}
6666

6767
async insertAsync(doc: DBInterface): Promise<DBInterface['_id']> {

meteor/server/publications/lib/debounce.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class PromiseDebounce<TResult = void, TArgs extends unknown[] = []> {
2525
* Trigger an execution, and get the result.
2626
* @returns A promise that resolves with the result of the function
2727
*/
28-
async call(...args: TArgs): Promise<TResult> {
28+
call = async (...args: TArgs): Promise<TResult> => {
2929
return new Promise<TResult>((resolve, reject) => {
3030
const listener: Listener<TResult> = { resolve, reject }
3131
this.#waitingListeners.push(listener)
@@ -38,7 +38,7 @@ export class PromiseDebounce<TResult = void, TArgs extends unknown[] = []> {
3838
/**
3939
* Trigger an execution, but don't report the result.
4040
*/
41-
trigger(...args: TArgs): void {
41+
trigger = (...args: TArgs): void => {
4242
// If an execution is 'imminent', don't do anything
4343
if (this.#pendingArgs) {
4444
this.#pendingArgs = args
@@ -52,11 +52,11 @@ export class PromiseDebounce<TResult = void, TArgs extends unknown[] = []> {
5252
this.#timeout = Meteor.setTimeout(() => {
5353
this.#timeout = undefined
5454

55-
this.#executeFn(args)
55+
this.executeFn(args)
5656
}, this.#wait)
5757
}
5858

59-
#executeFn(args: TArgs): void {
59+
private executeFn(args: TArgs): void {
6060
// If an execution is still in progress, mark as pending and stop
6161
if (this.#isExecuting) {
6262
this.#pendingArgs = args
@@ -96,15 +96,15 @@ export class PromiseDebounce<TResult = void, TArgs extends unknown[] = []> {
9696
// If there is a pending execution, run that soon
9797
if (this.#pendingArgs) {
9898
const args = this.#pendingArgs
99-
Meteor.setTimeout(() => this.#executeFn(args), 0)
99+
Meteor.setTimeout(() => this.executeFn(args), 0)
100100
}
101101
})
102102
}
103103

104104
/**
105105
* Cancel any waiting execution
106106
*/
107-
cancelWaiting(error?: Error): void {
107+
cancelWaiting = (error?: Error): void => {
108108
this.#pendingArgs = null
109109

110110
if (this.#timeout) {

meteor/server/publications/pieceContentStatusUI/rundown/rundownContentObserver.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ export class RundownContentObserver {
6060

6161
const observer = new RundownContentObserver(cache)
6262

63-
await observer.#initShowStyleBaseIdObserver()
63+
await observer.initShowStyleBaseIdObserver()
6464

6565
// This takes ownership of the #showStyleBaseIdObserver, and will stop it if this throws
66-
await observer.#initContentObservers(rundownIds)
66+
await observer.initContentObservers(rundownIds)
6767

6868
return observer
6969
}
7070

71-
async #initShowStyleBaseIdObserver() {
71+
private async initShowStyleBaseIdObserver() {
7272
// Run the ShowStyleBase query in a ReactiveMongoObserverGroup, so that it can be restarted whenever
7373
this.#showStyleBaseIdObserver = await ReactiveMongoObserverGroup(async () => {
7474
// Clear already cached data
@@ -103,7 +103,7 @@ export class RundownContentObserver {
103103
})
104104
}
105105

106-
async #initContentObservers(rundownIds: RundownId[]) {
106+
private async initContentObservers(rundownIds: RundownId[]) {
107107
// Subscribe to the database, and pipe any updates into the ReactiveCacheCollections
108108
this.#observers = await waitForAllObserversReady([
109109
Rundowns.observeChanges(

0 commit comments

Comments
 (0)