Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- metricsUsers({ db, userId, courseId }) {
- },
- metricsState ({ db, courseId }) {
- },
- metricsProfessores({ db, courseId, ProfessorId}) {
- }
- metrics ({ db, options}, ...args) {
- const metrics = {}
- await Bluebird.map(args, (arg) => {
- if (typeof arg === 'function') {
- metrics[arg] = await MyClass[arg]({db, ...options})
- }
- return null
- }, { concurrency: 3 })
- console.log({metrics})
- }
Advertisement
Add Comment
Please, Sign In to add comment