StellarFw / stellar

A modular action based Web Framework for Node.js

Home Page:https://stellar-framework.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support to Promises on tasks

gil0mendes opened this issue · comments

We must add support to Promises on the tasks system. This will extend the framework support for this amazing syntax.

Atenttion: We must keep backwards compatibility for next(), this still to be usefull in some cases.

Down bellow there is a example of how that should looks like.

'use strict'

exports.afterCancelRepair = {
  name: 'afterCancelRepair',
  description: 'This returns all the material to the stock and remove all material requests',

  queue: 'default',
  frequency: 0,

  async run (api, param) {
    // do stuff...
  }
}

😍