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

updating job progress inside of job #124

Closed
bulkan opened this issue Sep 1, 2012 · 1 comment
Closed

updating job progress inside of job #124

bulkan opened this issue Sep 1, 2012 · 1 comment

Comments

@bulkan
Copy link

bulkan commented Sep 1, 2012

Hi,

First of all thanks for a rq it's quite awesome !

I was just wondering if is possible to add a feature where the Job object is passed onto the job function so that it can update its progress into redis ?

Something like;

@job('low', conn=my_redis_conn, timeout=5)
def slow_fib(n, j):
    j.progress(n)
    if n <= 1:
        return 1
    else:
        return slow_fib(n-1) + slow_fib(n-2)

Cheers

@nvie
Copy link
Collaborator

nvie commented Sep 2, 2012

Closing this by being a duplicate of #46 and #54.

Progress reporting is a domain specific problem, which has been talked about earlier, but which is too broad for RQ itself.

That said, I'd have to agree with you that RQ currently does not provide you with the proper primitives to implement such easily yourself. Therefore, I've opened #125 to put it back on the agenda to get the Job instance or the job ID available from within the job function.

Thanks for submitting.

@nvie nvie closed this as completed Sep 2, 2012
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