So I've read through the documentation twice and could have skipped over 
some key point, but i'm having an issue submitting a task from a task.

I've stupefied my to paste it here, but basically from a controller i'm 
doing this:

scheduler.queue_task(my_parent_task,
        pvars=dict(arg1=val,arg2=val))



...in scheduler.py:

def my_parent_task(arg1,arg2):
    for batch in things_to_do: 
        print "submitting job"
        r = scheduler.queue_task(my_child_task,
        pvars=dict(arg1= arg1,arg2=batch))
        print r

    return 1


def my_child_task(arg1,arg2):
    print "in child task!"
    return 1
    




>From the output of the parent task, if I print the row returned from 
scheduling the child task there are no errors and the tasks get assigned 
ids:

submitting job 
<Row {'errors': {}, 'id': 27, 'uuid': 
'536b51a4-ac1d-4f28-9b86-060233aecf39'}> 
submitting job 
<Row {'errors': {}, 'id': 28, 'uuid': 
'09d73ff5-76a2-464f-9297-bad7463c44c4'}> 
submitting job
<Row {'errors': {}, 'id': 29, 'uuid': 
'f2190fde-642a-4d1e-95d4-fa363dfc9f2c'}>


If i look in scheduler_task the parent task id 26 is present but none of 
the child tasks.  If i resubmit my parent task it does in fact get assigned 
ID 30 so mysql is autoincrementing the column. 

Is there something i'm missing again where this is expected behavior?  I'd 
really like to be able to chain tasks together.  Thanks,

Dean


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to