@get('/admin/<taskid>/flush')
def task_flush(taskid):
 for key in list(DataStore.tasks):
  if (is_admin(taskid) or (DataStore.tasks[key].remote_addr == request.remote_addr)):
   DataStore.tasks[key].engine_kill()
   del DataStore.tasks[key]
 logger.debug(('[%s] Flushed task pool (%s)' % (taskid, ('admin' if is_admin(taskid) else request.remote_addr))))
 return jsonize({'success': True})

@ get ( '/admin/<taskid>/flush' ) def task_flush ( taskid ) : for key in list ( DataStore . tasks ) : if ( is_admin ( taskid ) or ( DataStore . tasks [ key ] . remote_addr == request . remote_addr ) ) : DataStore . tasks [ key ] . engine_kill ( ) del DataStore . tasks [ key ] logger . debug ( ( '[%s] Flushed task pool (%s)' % ( taskid , ( 'admin' if is_admin ( taskid ) else request . remote_addr ) ) ) ) return jsonize ( { 'success' : True } )
flush task spool .