discoproject/disco — Issue #287: Can't run job when creating new one by inherit Job
Author: marw
Created: 2011-11-22 22:16:45+00:00
State: open

I tried to write job by inherit disco.job.Job

I modified examples/faq/chain.py from disco 4.1 distribution:

```python
from disco.job import Job
class FirstJob(Job):
input = ["file://testwords.txt"]
@staticmethod
def map(line, params):
yield int(line) + 1, ""
if __name__ == "__main__":
last = FirstJob().run().wait()
```

In same folder I created file "testwords.txt" and run mychain.py, I got:
disco.error.JobError: Job FirstJob@529:f4221:5146f failed: Status dead
in disco interface:
AttributeError: 'module' object has no attribute 'FirstJob'

It look like invalid JobPack creation, I expect that disco pack file with class.

Similar problem when running http://discoproject.org/doc/howto/discodb.html#discodb-tutorial