question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

success emit returns an undefined result

See original GitHub issue

Based on the example, I notice when using the event emitter ‘success’, the “result” is undefined. Is this right? Perhaps, it is something I am doing something incorrectly.

q.on(‘success’, function(result, job) {

    console.log(result);
    console.log('job successful processing:', job.toString().replace(/\n/g, ''));
    console.log(q.length);

})

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pallixcommented, Oct 11, 2016

This needs to go in the documentation! What is the purpose of the first argument to cb?

0reactions
jessetanecommented, Oct 11, 2016

I actually don’t find myself using this result passing feature. I just store whatever results I need before calling cb. Such as in the example: https://github.com/jessetane/queue/blob/master/example/index.js

There are also other libraries that handle result capturing in a more well defined way than queue such as run-parallel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

this.$emit is not a function within ajax success request
I am trying to have an emit command after the success of the ajax request. The ajax works fine so don't worry about...
Read more >
Resolving the JavaScript Promise Error "TypeError - Pluralsight
TypeError - Cannot read property 'then' of undefined is thrown when the caller is expecting a Promise to be returned and instead receives ......
Read more >
RxJS: Getting fooled by empty observables - Novanet blog
The subscribe operator in RxJS provides three callbacks: success, error and complete: Success -> Whenever the Observable emits an item.
Read more >
Do something after $emit has finished (successful) - Vue Forum
My issues seems to revolve around asynchronous data manipulation, such that the events that take place after the emit depends on the emit...
Read more >
VueJS Custom Event - Emit Multiple Values - Cody Bontecou
We emitted the success event from the child component. This event can be captured within the parent component where the child is rendered...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found