#NEWLINE# def __init_schedule_jobs( ) : #NEWLINE# #INDENT# 'Init scheduled jobs in fact' #NEWLINE# log . debug ( 'init scheduled jobs......' ) #NEWLINE# util = RequiredFeature ( 'util' ) #NEWLINE# sche = RequiredFeature ( 'scheduler' ) #NEWLINE# if ( not util . is_local ( ) ) : #NEWLINE# #INDENT# hackathon_manager = RequiredFeature ( 'hackathon_manager' ) #NEWLINE# host_server_manager = RequiredFeature ( 'docker_host_manager' ) #NEWLINE# next_run_time = ( util . get_now ( ) + timedelta ( seconds = 10 ) ) #NEWLINE# sche . add_interval ( feature = 'expr_manager' , method = 'scheduler_recycle_expr' , id = 'scheduler_recycle_expr' , next_run_time = next_run_time , minutes = 10 ) #NEWLINE# hackathon_manager . schedule_pre_allocate_expr_job ( ) #NEWLINE# #UNINDENT# sche . add_interval ( feature = 'user_manager' , method = 'check_user_online_status' , id = 'check_user_online_status' , minutes = 10 )