kcws 3.51__tar.gz → 3.53__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: kcws
3
- Version: 3.51
3
+ Version: 3.53
4
4
  Summary: kcwebs作为web开发而设计的高性能框架
5
5
  Home-page: https://docs.kwebapp.cn/index/index/2
6
6
  Author: 百里-坤坤
@@ -9,5 +9,5 @@ Maintainer: 坤坤
9
9
  Maintainer-email: fk1402936534@qq.com
10
10
  License: MIT License
11
11
  Description: kcwebs作为web开发而设计的高性能框架,采用全新的架构思想,注重易用性。遵循MIT开源许可协议发布,意味着个人和企业可以免费使用kcwebs,甚至允许把你基于kcwebs开发的应用开源或商业产品发布或销售。完整文档请访问:https://docs.kwebapp.cn/index/index/2
12
- Keywords: kcws3.51
12
+ Keywords: kcws3.53
13
13
  Platform: UNKNOWN
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = '3.51'
2
+ __version__ = '3.53'
3
3
  try:
4
4
  from .app import web
5
5
  except:
@@ -130,10 +130,12 @@ def md5(strs):
130
130
  b = strs.encode(encoding='utf-8')
131
131
  m.update(b)
132
132
  return m.hexdigest()
133
- def kcws_kill_path_pid(folder):
133
+ def kcws_kill_path_pid(folder,retry=60):
134
134
  """结束指定目录pid
135
135
 
136
136
  folder 目录
137
+
138
+ retry 重试次数
137
139
  """
138
140
  if os.path.exists(folder):
139
141
  lis=os.listdir(folder)
@@ -142,7 +144,7 @@ def kcws_kill_path_pid(folder):
142
144
  f=open(folder+"/"+files,'r')
143
145
  pid=f.read()
144
146
  f.close()
145
- kill_pid(pid)
147
+ kill_pid(pid,retry=retry)
146
148
  os.remove(folder+"/"+files)
147
149
 
148
150
  def kcws_save_folder_pid(folder,pid):
@@ -213,13 +215,13 @@ def get_kcws_cli_info(route,types='pid'):
213
215
  pid=get_kcws_cli_pid(route)
214
216
  return get_pid_info(pid=pid,types=types)
215
217
 
216
- def kill_pid(pid):
218
+ def kill_pid(pid,retry=60):
217
219
  """通过进程结束进程
218
220
 
219
221
  pid 进程号
220
222
  """
221
223
  if pid:
222
- for i in range(60):
224
+ for i in range(retry):
223
225
  if 'Linux' in get_sysinfo()['platform']:
224
226
  os.system("kill -9 "+str(pid))
225
227
  else:
@@ -228,19 +230,21 @@ def kill_pid(pid):
228
230
  except:pass
229
231
  if not get_pid_info(pid=pid,types='pid'):
230
232
  return True
231
- else:
233
+ elif retry>1:
232
234
  time.sleep(0.1)
233
235
  # if i>60:
234
236
  # raise Exception('kill_pid error:pid='+str(pid))
235
237
  return True
236
- def kill_route_cli(route):
238
+ def kill_route_cli(route,retry=60):
237
239
  """通过路由结束进程
238
240
 
239
241
  route 路由地址
242
+
243
+ retry 重试次数
240
244
  """
241
245
  pid=get_kcws_cli_pid(route)
242
246
  if pid:
243
- if kill_pid(pid):
247
+ if kill_pid(pid,retry=retry):
244
248
  try:
245
249
  os.remove(get_folder()+"/pid/"+md5(route)+"_cli_pid")
246
250
  except:pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: kcws
3
- Version: 3.51
3
+ Version: 3.53
4
4
  Summary: kcwebs作为web开发而设计的高性能框架
5
5
  Home-page: https://docs.kwebapp.cn/index/index/2
6
6
  Author: 百里-坤坤
@@ -9,5 +9,5 @@ Maintainer: 坤坤
9
9
  Maintainer-email: fk1402936534@qq.com
10
10
  License: MIT License
11
11
  Description: kcwebs作为web开发而设计的高性能框架,采用全新的架构思想,注重易用性。遵循MIT开源许可协议发布,意味着个人和企业可以免费使用kcwebs,甚至允许把你基于kcwebs开发的应用开源或商业产品发布或销售。完整文档请访问:https://docs.kwebapp.cn/index/index/2
12
- Keywords: kcws3.51
12
+ Keywords: kcws3.53
13
13
  Platform: UNKNOWN
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes