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

Emulate job.progress function for sandboxed processors #1536

Merged
merged 1 commit into from
Nov 3, 2019
Merged

Emulate job.progress function for sandboxed processors #1536

merged 1 commit into from
Nov 3, 2019

Conversation

douglascayers
Copy link
Contributor

The Job.progress function acts as a getter and setter depending on the argument value passed to it.

In the context of a sandboxed job processor (forked process), the job instance given to the processor is actually a wrapped JSON message. The progress function on the wrapped job object only behaves as an asynchronous setter.

This pull request modifies the progress function on the wrapped job object to behave as both a getter and a setter.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 93.736% when pulling 36ce1b1 on douglascayers:sandboxed-job-progress into 146bc8e on OptimalBits:develop.

@manast
Copy link
Member

manast commented Nov 3, 2019

Great job!. @stansv this PR would be great on BullMQ too :).

@manast manast merged commit 72e1a1b into OptimalBits:develop Nov 3, 2019
@stansv
Copy link
Contributor

stansv commented Nov 3, 2019

@manast I'll port this tomorrow
thanks @douglascayers

@douglascayers
Copy link
Contributor Author

Happy to help! Thanks for the wonderful project and for accepting my PR :)

stansv added a commit to taskforcesh/bullmq that referenced this pull request Nov 5, 2019
@douglascayers douglascayers deleted the sandboxed-job-progress branch November 29, 2019 18:17
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 this pull request may close these issues.

4 participants