Guanyu-Lin commited on
Commit
28ea05d
1 Parent(s): b361765
Files changed (1) hide show
  1. arxiv_agent.py +4 -3
arxiv_agent.py CHANGED
@@ -152,8 +152,6 @@ def dailySave(agent_ls):
152
  with open(agent.profile_path,"w") as f:
153
  json.dump(agent.profile,f)
154
 
155
- with open(agent.email_pool_path,"w") as f:
156
- json.dump(agent.email_pool,f)
157
 
158
  with open(agent.comment_path,"w") as f:
159
  json.dump(agent.comment,f)
@@ -186,7 +184,6 @@ class ArxivAgent:
186
  self.download()
187
  try:
188
  thread6.run_threaded(dailyDownload, [self])
189
- thread6.run_threaded(monthlyEmail, [self])
190
  thread6.run_threaded(dailySave, [self])
191
 
192
  except:
@@ -201,6 +198,10 @@ class ArxivAgent:
201
  def sign_email(self, profile, email):
202
 
203
  self.email_pool[email]=profile
 
 
 
 
204
  return "Successfully sign up!"
205
 
206
  def get_profile(self, author_name):
 
152
  with open(agent.profile_path,"w") as f:
153
  json.dump(agent.profile,f)
154
 
 
 
155
 
156
  with open(agent.comment_path,"w") as f:
157
  json.dump(agent.comment,f)
 
184
  self.download()
185
  try:
186
  thread6.run_threaded(dailyDownload, [self])
 
187
  thread6.run_threaded(dailySave, [self])
188
 
189
  except:
 
198
  def sign_email(self, profile, email):
199
 
200
  self.email_pool[email]=profile
201
+ with scheduler.lock:
202
+ with open(self.email_pool_path,"w") as f:
203
+ json.dump(self.email_pool,f)
204
+
205
  return "Successfully sign up!"
206
 
207
  def get_profile(self, author_name):