Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eval writing out JobClass emit function in result #69

Closed
zgohr opened this issue Dec 3, 2011 · 2 comments
Closed

Eval writing out JobClass emit function in result #69

zgohr opened this issue Dec 3, 2011 · 2 comments

Comments

@zgohr
Copy link

zgohr commented Dec 3, 2011

$ echo "foo" | node.io -s eval "input.match(/bar/)"

Outputs this text to stdout

function (result) {
            worker.emit('output', result);
            instance.cancel_timeout();
            instance.isComplete = true;
            var emit = function () {

                job.instances--;

                //Reuse the instance later on
                job.instance_pool.push(instance);

                worker.emit('process');
            };

            if (job.options.wait) {
                setTimeout(emit, job.options.wait * 1000);
            } else {
                emit();
            }
        }

When I would have expected nothing to be returned.

@zgohr
Copy link
Author

zgohr commented Dec 3, 2011

I have the fix, I'll make a pull request this afternoon

@zgohr zgohr closed this as completed Dec 3, 2011
@chriso
Copy link
Contributor

chriso commented Dec 5, 2011

Fixed as of v0.4.4

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

No branches or pull requests

2 participants