예제 #1
0
파일: queue.py 프로젝트: prcek/TSReg
def plan_job_card_for_students(owner,student_ids,course_code, season_name, info_line_1, info_line_2):
    logging.info('prepare cards for %s, code=%s, season=%s, line1=%s, line2=%s'%(student_ids,course_code, season_name, info_line_1, info_line_2))

    job = Job()
    job.init("prepare cards",target='../../', owner=owner)
    job.save()
 
    taskqueue.add(url='/task/prepare_cards/', params={'job_id':job.key().id(), 'owner':owner, 'student_ids':student_ids, 'course_code': course_code, 'season_name':season_name, 'info_line_1':info_line_1, 'info_line_2': info_line_2})

    logging.info('job_id %d'%(job.key().id())) 

    return job.key().id()
예제 #2
0
파일: queue.py 프로젝트: prcek/TSReg
def plan_job_makecopy_students(owner,student_ids,source_course, target_course):
    logging.info('makecopy %s from course %d to course %d'%(student_ids,source_course.key().id(), target_course.key().id()))    

    job = Job()
    job.init("makecopy_students",target='../../', owner=owner)
    job.save()
 
    taskqueue.add(url='/task/makecopy_students/', params={'job_id':job.key().id(), 'owner':owner, 'student_ids':student_ids, 'source_course_id': source_course.key().id(), 'target_course_id':target_course.key().id()})

    logging.info('job_id %d'%(job.key().id())) 

    return job.key().id()
예제 #3
0
파일: queue.py 프로젝트: prcek/TSReg
def plan_job_hide_students(owner,student_ids,course):
    logging.info('hide students %s'%(student_ids))

    job = Job()
    job.init("delete students",target='../../', owner=owner)
    job.save()
 
    taskqueue.add(url='/task/hide_students/', params={'job_id':job.key().id(), 'owner':owner, 'student_ids':student_ids, 'course_id': course.key().id()})

    logging.info('job_id %d'%(job.key().id())) 

    return job.key().id()
예제 #4
0
파일: queue.py 프로젝트: prcek/TSReg
def plan_job_cardout_for_students(owner,student_ids):
    logging.info('prepare cardout for %s'%(student_ids))

    job = Job()
    job.init("prepare cardout",target='../../', owner=owner)
    job.save()
 
    taskqueue.add(url='/task/prepare_cardout/', params={'job_id':job.key().id(), 'owner':owner, 'student_ids':student_ids})

    logging.info('job_id %d'%(job.key().id())) 

    return job.key().id()
예제 #5
0
파일: queue.py 프로젝트: prcek/TSReg
def plan_job_invitation_for_students(owner,student_ids,mode, addressing_parents, addressing_p,addressing_s,addressing_d):
    logging.info('prepare invitations for %s, mode=%s, addressing_parents=%s'%(student_ids,mode,addressing_parents))

    job = Job()
    job.init("prepare invitations",target='../../', owner=owner)
    job.save()
 
    taskqueue.add(url='/task/prepare_invitations/', params={'job_id':job.key().id(), 'owner':owner, 'student_ids':student_ids, 'mode': mode, 'addressing_parents':addressing_parents,
    'addressing_p':addressing_p,'addressing_s':addressing_s,'addressing_d':addressing_d})

    logging.info('job_id %d'%(job.key().id())) 

    return job.key().id()