瀏覽代碼

auto commit

master
jfinn 2 年之前
父節點
當前提交
6986cfaed1
共有 1 個檔案被更改,包括 20 行新增4 行删除
  1. 20
    4
      wsps/tasks_loop.py

+ 20
- 4
wsps/tasks_loop.py 查看文件

@@ -189,6 +189,7 @@ class globCL():
189 189
 		p("_run_persistent_loop:")
190 190
 		loop = asyncio.get_event_loop()
191 191
 		self.run_persistent_loop = nop
192
+		self.rman.persistent_loop_cb()
192 193
 		loop.create_task(self.persistent_loop())
193 194
 		self.loop = loop
194 195
 	run_persistent_loop = _run_persistent_loop
@@ -205,9 +206,24 @@ class RldMan():
205 206
 
206 207
 		base_path = "/usr/games/repos/ign4/py_rld/djc/rdir1/"
207 208
 
209
+		# [base_path+"r0.py",{"ftxt":"zz2"}],
210
+
211
+		file_list = [
212
+		base_path+"i0.py",
213
+		base_path+"i1.py",
214
+		base_path+"i2.py",
215
+		base_path+"i3.py",
216
+		base_path+"i4.py",
217
+		base_path+"i5.py",
218
+		]
219
+		
220
+
221
+		self.add_files(file_list)
222
+		# self.add_files(file_list,{"run"})
223
+	def persistent_loop_cb(self,*a,**kw):
224
+
208 225
 		file_list = [
209
-		# base_path+"r0.py",
210
-		[base_path+"r0.py",{"ftxt":"zz2"}],
226
+		base_path+"r0.py",
211 227
 		base_path+"r1.py",
212 228
 		base_path+"r2.py",
213 229
 		base_path+"r3.py",
@@ -230,8 +246,8 @@ class RldMan():
230 246
 			rfile_obj = self.files[file_name]
231 247
 			st = os.stat(file_name)
232 248
 			st_tuple = (st.st_mtime,st.st_size)
233
-			# if rfile_obj["ftxt"] == "":
234
-				# rfile_obj["ftxt"] = st_tuple
249
+			if rfile_obj["ftxt"] == "":
250
+				rfile_obj["ftxt"] = st_tuple
235 251
 			if rfile_obj["ftxt"] != st_tuple:
236 252
 				p(rfile_obj["ftxt"])
237 253
 				rfile_obj["ftxt"] = st_tuple

Loading…
取消
儲存