diff --git a/metadata.py b/metadata.py index d7473b1..a6396c1 100644 --- a/metadata.py +++ b/metadata.py @@ -1,3 +1,3 @@ #!/usr/bin/env python3 ver = "0.3.7" -stage = "production" \ No newline at end of file +stage = "prod_rev1" \ No newline at end of file diff --git a/precache.py b/precache_legacy.py similarity index 100% rename from precache.py rename to precache_legacy.py diff --git a/reactor.py b/reactor.py index 8e2483e..68c8010 100644 --- a/reactor.py +++ b/reactor.py @@ -41,7 +41,7 @@ class Glimpse(): class Apparatus(): """反应器对象, 决策一个原子的不同记忆方式, 并反馈到布局""" - def __init__(self, screen, reactor, atom): + def __init__(self, screen, reactor, atom, is_review = 0): self.electron: pt.Electron = atom[0] self.nucleon: pt.Nucleon = atom[1] self.positron: dict = atom[2] @@ -60,7 +60,10 @@ class Apparatus(): self.procession.append(comps.registry[i](screen, reactor, atom)) # self.procession.reverse() random.shuffle(self.procession) - + if self.positron["is_new_activation"] == 0: + self.procession.append(comps.registry['recognition'](screen, reactor, atom)) + if is_review == 1: + self.procession = [self.procession[-2], self.procession[-1]] def iterator(self): yield from self.procession @@ -69,6 +72,7 @@ class Reactor(): """反应堆对象, 处理和分配一次文件记忆流程的资源与策略""" def __init__(self, nucleon_file: pt.NucleonUnion, electron_file: pt.ElectronUnion, screen, tasked_num): # 导入原子对象 + self.stage = 0 self.nucleon_file = nucleon_file self.electron_file = electron_file self.tasked_num = tasked_num @@ -132,6 +136,7 @@ class Reactor(): 2: self.atoms_new, 3: (self.atoms_new + self.atoms_review) } + self.stage = stage ret = 1 if stage == 1 and len(processions[1]) == 0: stage = 2 @@ -163,7 +168,7 @@ class Reactor(): return -1 # 此轮已完成 self.index += step self.current_atom = self.procession[self.index] - self.current_appar = Apparatus(self.screen, self, self.current_atom).iterator() + self.current_appar = Apparatus(self.screen, self, self.current_atom, (self.stage == 1)).iterator() return 0 def save(self): diff --git a/sync_t.py b/sync_t.py new file mode 100644 index 0000000..6adaba9 --- /dev/null +++ b/sync_t.py @@ -0,0 +1 @@ +# 同步工具 原型 \ No newline at end of file