StellarFw / stellar

A modular action based Web Framework for Node.js
https://stellar-framework.com
MIT License
38 stars 4 forks source link

Add support to Promises on tasks #91

Closed gil0mendes closed 6 years ago

gil0mendes commented 7 years ago

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...
  }
}
ivoribeiro commented 7 years ago

😍