def req_job_run(r, **attr):
 if r.interactive:
  if r.id:
   current.s3task.async('req_add_from_template', [r.id], {'user_id': current.auth.user.id})
   current.session.confirmation = current.T('Request added')
 r.component_id = None
 redirect(r.url(method=''))

def req_job_run ( r , ** attr ) : if r . interactive : if r . id : current . s3task . async ( 'req_add_from_template' , [ r . id ] , { 'user_id' : current . auth . user . id } ) current . session . confirmation = current . T ( 'Request added' ) r . component_id = None redirect ( r . url ( method = '' ) )
restful method to run a job now .