ovictoraurelio

Untitled

Jun 22nd, 2021
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1.  
  2. metricsUsers({ db, userId, courseId }) {
  3.  
  4. },
  5.  
  6. metricsState ({ db, courseId }) {
  7.  
  8. },
  9. metricsProfessores({ db, courseId, ProfessorId}) {
  10.  
  11. }
  12.  
  13. metrics ({ db, options}, ...args) {
  14.  
  15. const metrics = {}
  16.  
  17. await Bluebird.map(args, (arg) => {
  18. if (typeof arg === 'function') {
  19. metrics[arg] = await MyClass[arg]({db, ...options})
  20. }
  21. return null
  22. }, { concurrency: 3 })
  23.  
  24.  
  25. console.log({metrics})
  26. }
Advertisement
Add Comment
Please, Sign In to add comment