Use an iterator to generate jobs instead of storing them in a queue

Creating jobs ahead of time and storing in a queue would bear stress on memory since it might have store a lot of jobs who will not be used any time near from the time of generation.

Moving this to an iterator helps us create the jobs as and when necessary and avoid storing an additional data structure for it.

Signed-off-by: Imran M Yousuf <imyousuf@newscred.com>