Mirror of https://github.com/roostorg/coop github.com/roostorg/coop
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 557ff54b2b435e5f1e789c6a8a4e1bebf2d7deb6 28 lines 664 B view raw
1import { inject } from '../../iocContainer/utils.js'; 2 3export default inject( 4 [ 5 'UserStatisticsService', 6 'getPolicyActionPenaltiesEventuallyConsistent', 7 'closeSharedResourcesForShutdown', 8 'Tracer', 9 ], 10 ( 11 userStatsService, 12 getPolicyActionPenalties, 13 sharedResourceShutdown, 14 tracer, 15 ) => ({ 16 type: 'Job' as const, 17 async run() { 18 await tracer.addActiveSpan( 19 { resource: 'userScores', operation: 'refreshScoresCache' }, 20 async () => 21 userStatsService.refreshUserScoresCache(getPolicyActionPenalties), 22 ); 23 }, 24 async shutdown() { 25 await sharedResourceShutdown(); 26 }, 27 }), 28);