File tree 2 files changed +2
-8
lines changed
graphql/private/mutations
2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 1
1
import DataLoader from 'dataloader'
2
- import { Logger } from '../utils/Logger'
3
2
import * as atlassianLoaders from './atlassianLoaders'
4
3
import * as azureDevOpsLoaders from './azureDevOpsLoaders'
5
4
import * as customLoaderMakers from './customLoaderMakers'
@@ -94,10 +93,3 @@ export default class RootDataLoader<
94
93
// RootDataLoader
95
94
96
95
export const dataLoaderCache = new DataLoaderCache ( RootDataLoader )
97
-
98
- // Can remove this after we verify there are no memory leaks in prod
99
- // count staying constant or going down = good
100
- setInterval ( ( ) => {
101
- const workerCount = Object . keys ( dataLoaderCache . workers ) . length
102
- Logger . log ( { workerCount} )
103
- } , 60_000 ) . unref ( )
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ const disconnectSocket: MutationResolvers['disconnectSocket'] = async (
19
19
redis . lrange ( `presence:${ userId } ` , 0 , - 1 )
20
20
] )
21
21
if ( ! user ) {
22
+ // user could've been deleted & then key not wiped
23
+ await redis . del ( `presence:${ userId } ` )
22
24
throw new Error ( `User does not exist: ${ userId } ` )
23
25
}
24
26
const tms = user . tms ?? [ ]
You can’t perform that action at this time.
0 commit comments