浏览代码

auto commit

master
jfinn 2 年前
父节点
当前提交
c30b1416e0
共有 1 个文件被更改,包括 19 次插入11 次删除
  1. 19
    11
      wsps/tasks_loop.py

+ 19
- 11
wsps/tasks_loop.py 查看文件

@@ -41,11 +41,8 @@ class AclTaskMixin:
41 41
 
42 42
 # GCLMixin
43 43
 class globCL():
44
-	init_cnt = 0
45 44
 	def __init__(self,*a,**kw):
46 45
 		# for now we are not going to do any weird class stuff
47
-		cls = self.__class__
48
-		cls.init_cnt += 1
49 46
 		self.r = connect_redis()
50 47
 		pass
51 48
 	async def persistent_loop(self,*a,**kw):
@@ -53,17 +50,27 @@ class globCL():
53 50
 	def run_persistent_loop(self,*a,**kw):
54 51
 		pass
55 52
 
56
-
57
-# p("300 globCL.init_cnt:",globCL.init_cnt)
58
-glob_cl =  globCL()
59
-# p("400 globCL.init_cnt:",globCL.init_cnt)
60
-# glob_cl_b =  globCL()
61
-# p("501 globCL.init_cnt:",globCL.init_cnt)
62
-
63
-# print("..",end="\n",flush=True)
53
+# RldManMixin
54
+class RldMan():
55
+	def __init__(self,*a,**kw):
56
+		base_path = "/usr/games/repos/ign4/py_rld/djc/rdir1/"
57
+		self.files = [
58
+		base_path+"",
59
+		]
60
+	def add_files(self,files):
61
+		for file in files:
62
+			if type(file)==str:
63
+				self.add_file(file)
64
+			elif type(file)==list:
65
+				self.add_file(*file)
66
+			else:
67
+				p("add files???",file)
68
+	def add_file(self,file_name,fnx={}):
69
+		self.files[file_name] = {"ftxt":"",**fnx}
64 70
 
65 71
 
66 72
 
73
+glob_cl =  globCL()
67 74
 
68 75
 
69 76
 
@@ -71,6 +78,7 @@ glob_cl =  globCL()
71 78
 
72 79
 
73 80
 
81
+# print("..",end="\n",flush=True)
74 82
 
75 83
 def redis_info():
76 84
 	rconn = glob_cl.r

正在加载...
取消
保存