binarymatt / pyres

a resque clone in python
http://github.com/binarydud/pyres
MIT License
955 stars 130 forks source link

Job class should throw an exception if it can't load the class #26

Closed robbiehudson closed 14 years ago

robbiehudson commented 14 years ago

The Job class perform method should throw an exception if it can't load the worker class. At the moment safe_str_to_class returns NoneType which then causes an error which doesn't make it immediately obvious what the problem is.

binarymatt commented 14 years ago

hopefully I will get to work on this sometime today

yashh commented 14 years ago

I think the safe_str_to_class (or) my_import should raise a error and fail with a message that pyres could n't import your Task Class. Try setting your PYTHONPATH or DJANGO settings variable.

binarymatt commented 14 years ago

ok, i've put a first stab up on my repository in a branch named import_error. Right now all the tests pass, but I am going to run through a smoke test tonight or tomorrow.

binarymatt commented 14 years ago

this has been pushed up into master