Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

on{TaskName}Task handler will not fire #73

Open
sigmasoldi3r opened this issue Jan 19, 2018 · 1 comment
Open

on{TaskName}Task handler will not fire #73

sigmasoldi3r opened this issue Jan 19, 2018 · 1 comment

Comments

@sigmasoldi3r
Copy link

When running in sync mode, it runs smooth, ie:

In the script part

exports.main = () => {
  runTask('sampleTask');
};

exports.onSampleTaskTask = () => {
  // Code will reach this without problems
};

At the host side

script.on('task', (err, task, options, method, resolve) => resolve());

But when running async operations this will no longer happen, the on{TaskName}Task handler will not fire, if the host side is like:

script.on('task', (err, task, options, method, resolve) => {
   aTrueAsyncPromise.then((result) => resolve(result));
});

Is there any flag that should be turned on? Or something that I am missing.

PD: I'm not setting timeout because the script depends on user's input, so better to not time out.

@bcoe
Copy link
Owner

bcoe commented Apr 7, 2018

@sigmasoldi3r 👋unfortunately haven't touched this project in a few years (I should update the README with a deprecated notice).

Happy to help land any patches if you manage to debug this issue, but not doing much active development on this project currently.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants