def auto_run(*params): print('开始执行脚本'.center(60, '*')) run_one_file_name_list(path=params[0], file_name_list=tejia_file_name_list) run_one_file_name_list(path=params[1], file_name_list=logs_file_name_list) run_one_file_name_list(path=params[3], file_name_list=server_file_name_list) [kill_process_by_name(process_name) for process_name in spike_file_name_list[1:]] # 不杀spike # 运行tmall常规商品更新script run_one_file_name_list(path=params[2], file_name_list=real_file_name_list) if str(get_shanghai_time())[11:13] not in night_run_time: # kill冲突process [kill_process_by_name(process_name) for process_name in night_run_file_name_list] print('脚本执行完毕'.center(60, '*'))
def auto_run(*params): print('开始执行秒杀脚本'.center(60, '*')) run_one_file_name_list(path=params[0], file_name_list=spike_file_name_list) run_one_file_name_list(path=params[1], file_name_list=pintuan_file_name_list) run_one_file_name_list(path=params[2], file_name_list=real_file_name_list) run_one_file_name_list(path=params[3], file_name_list=other_file_name_list) run_one_file_name_list(path=params[4], file_name_list=logs_file_name_list) run_one_file_name_list(path=params[5], file_name_list=zwm_file_name_list) if str(get_shanghai_time())[11:13] not in night_run_time: # kill冲突process [kill_process_by_name(process_name) for process_name in night_run_file_name_list] print('脚本执行完毕'.center(60, '*'))
# coding:utf-8 ''' @author = super_fazai @File : kill_all_python_shell.py @connect : [email protected] ''' from fzutils.linux_utils import kill_process_by_name kill_process_by_name('python3')
# coding:utf-8 ''' @author = super_fazai @File : utils.py @connect : [email protected] ''' from fzutils.sql_utils import BaseRedisCli from fzutils.safe_utils import get_uuid3 from fzutils.data.pickle_utils import deserializate_pickle_object from fzutils.linux_utils import kill_process_by_name from fzutils.time_utils import get_shanghai_time from fzutils.common_utils import get_random_int_number from fzutils.common_utils import retry from pprint import pprint from pickle import dumps from time import sleep from random import choice from settings import high_proxy_list_key_name # print(get_uuid3('proxy_tasks')) # print(get_uuid3(high_proxy_list_key_name)) _ = BaseRedisCli() pprint( deserializate_pickle_object( _.get('5e421d78-a394-3b44-aae1-fd86aa127255') or dumps([]))) # 清除celery workers kill_process_by_name(process_name='celery')