ソースを参照

auto commit

master
jfinn 2年前
コミット
c30b1416e0
1個のファイルの変更19行の追加11行の削除
  1. 19
    11
      wsps/tasks_loop.py

+ 19
- 11
wsps/tasks_loop.py ファイルの表示

41
 
41
 
42
 # GCLMixin
42
 # GCLMixin
43
 class globCL():
43
 class globCL():
44
-	init_cnt = 0
45
 	def __init__(self,*a,**kw):
44
 	def __init__(self,*a,**kw):
46
 		# for now we are not going to do any weird class stuff
45
 		# for now we are not going to do any weird class stuff
47
-		cls = self.__class__
48
-		cls.init_cnt += 1
49
 		self.r = connect_redis()
46
 		self.r = connect_redis()
50
 		pass
47
 		pass
51
 	async def persistent_loop(self,*a,**kw):
48
 	async def persistent_loop(self,*a,**kw):
53
 	def run_persistent_loop(self,*a,**kw):
50
 	def run_persistent_loop(self,*a,**kw):
54
 		pass
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
 
78
 
72
 
79
 
73
 
80
 
81
+# print("..",end="\n",flush=True)
74
 
82
 
75
 def redis_info():
83
 def redis_info():
76
 	rconn = glob_cl.r
84
 	rconn = glob_cl.r

読み込み中…
キャンセル
保存