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

Feature (PR welcome): Use functions for a job #6

Closed
tmtron opened this issue Jul 17, 2020 · 4 comments · Fixed by #20
Closed

Feature (PR welcome): Use functions for a job #6

tmtron opened this issue Jul 17, 2020 · 4 comments · Fixed by #20

Comments

@tmtron
Copy link

tmtron commented Jul 17, 2020

As I understood the docs the only way to define a job is to have a .js file.
Is it possible or planned in the future, that we can simply pass a function for each job?

Our use-case: we use ncc to compile our node app to a single javascript file, so we cannot have separate .js files for jobs

@niftylettuce
Copy link
Contributor

PR is welcome, but I strongly encourage you to write your jobs so they are independent and sandboxed.

@tmtron tmtron closed this as completed Jul 17, 2020
@niftylettuce
Copy link
Contributor

I'm re-opening this in the hope that we can get a PR open soon for this!

@niftylettuce niftylettuce reopened this Aug 1, 2020
@niftylettuce niftylettuce changed the title Question: Use functions for a job? Feature (PR welcome): Use functions for a job Aug 1, 2020
@niftylettuce
Copy link
Contributor

Albeit this approach would not use workers, I think we may still want to have it supported out of the box.

@tmtron
Copy link
Author

tmtron commented Nov 6, 2020

Albeit this approach would not use workers, I think we may still want to have it supported out of the box.

@niftylettuce Has this changed? i.e. As I understand the docs#using-functions-for-jobs, the function will be executed in a separate worker thread, right?

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

Successfully merging a pull request may close this issue.

2 participants