设为首页 加入收藏

TOP

Python模块化开发组织代码程序示例(三)
2017-01-24 08:15:36 】 浏览:903
Tags:Python 模块化 开发 组织 代码 程序 示例
s = []
? ? request_user_remain_payamount_byweek = threadpool.makeRequests(user_remain_payamount_byweek, batch_week_list)
? ? request_user_remain_pay_byweek = threadpool.makeRequests(user_remain_pay_byweek, batch_week_list)


? ? requests.extend(request_user_remain_payamount_byweek)
? ? requests.extend(request_user_remain_pay_byweek)


? ? main_pool = threadpool.ThreadPool(8)
? ? [main_pool.putRequest(req) for req in requests]


if __name__ == '__main__':
? ? while True:
? ? ? ? try:
? ? ? ? ? ? time.sleep(960)
? ? ? ? ? ? main_pool.poll()
? ? ? ? except KeyboardInterrupt:
? ? ? ? ? ? print("**** Interrupted!")
? ? ? ? ? ? break
? ? ? ? except threadpool.NoResultsPending:
? ? ? ? ? ? break


? ? if main_pool.dismissedWorkers:
? ? ? ? print("Joining all dismissed worker threads...")
? ? ? ? main_pool.joinAllDismissedWorkers()


now_time = time.strftime('%Y-%m-%d %X', time.localtime())
print "当前时间是:",now_time


首页 上一页 1 2 3 4 5 下一页 尾页 3/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇用Python将统计数据不存在的记录.. 下一篇使用 Java 命令编译运行 Java 程序

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目