I had the following problem with my Python / Celery project in Eclipse / PyDev. I defined my task function in the myapp.tasks module as follows:
@celery.task(max_retries=None) def mytask(parm1): ... myapp.myfunction(parm1) ...
Then in another module I want to send a snooze signal to the task that calls the function. So I like this:
import myapp.tasks ... def myfunction(parm1): ... raise myapp.tasks.mytask.retry(countdown=60)
For some reason, PyDev marks the last line with the error message: 'Undefined variable from import: retry' But the code does work. Is this a PyDev issue that doesn't recognize decorators, or am I doing something wrong here?
source share