소스 검색

naming filelock->lockfile + default lockfile_path

Guénaël Muller 7 년 전
부모
커밋
ddb4624d99
4개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 1
      tracim/development.ini.base
  2. 3 2
      tracim/tracim/config/app_cfg.py
  3. 1 1
      tracim/tracim/lib/daemons.py
  4. 2 2
      tracim/tracim/lib/email_fetcher.py

+ 1 - 1
tracim/development.ini.base 파일 보기

@@ -230,7 +230,7 @@ email.reply.use_html_parsing = true
230 230
 email.reply.use_txt_parsing = true
231 231
 # Lockfile path is required for email_reply feature,
232 232
 # it's just an empty file use to prevent concurrent access to imap unseen mail
233
-email.reply.filelock_path = %(here)s/email_fetcher.lock
233
+email.reply.lockfile_path = %(here)s/email_fetcher.lock
234 234
 
235 235
 ## Radical (CalDav server) configuration
236 236
 # radicale.server.host = 0.0.0.0

+ 3 - 2
tracim/tracim/config/app_cfg.py 파일 보기

@@ -392,8 +392,9 @@ class CFG(object):
392 392
             'email.reply.use_txt_parsing',
393 393
             True,
394 394
         ))
395
-        self.EMAIL_REPLY_FILELOCK_PATH = tg.config.get(
396
-            'email.reply.filelock_path',
395
+        self.EMAIL_REPLY_LOCKFILE_PATH = tg.config.get(
396
+            'email.reply.lockfile_path',
397
+            '/tmp/tracim_email_fetcher.lock'
397 398
         )
398 399
 
399 400
         self.TRACKER_JS_PATH = tg.config.get(

+ 1 - 1
tracim/tracim/lib/daemons.py 파일 보기

@@ -179,7 +179,7 @@ class MailFetcherDaemon(Daemon):
179 179
             token=cfg.EMAIL_REPLY_TOKEN,
180 180
             use_html_parsing=cfg.EMAIL_REPLY_USE_HTML_PARSING,
181 181
             use_txt_parsing=cfg.EMAIL_REPLY_USE_TXT_PARSING,
182
-            filelock_path=cfg.EMAIL_REPLY_FILELOCK_PATH,
182
+            lockfile_path=cfg.EMAIL_REPLY_LOCKFILE_PATH,
183 183
         )
184 184
         self._fetcher.run()
185 185
 

+ 2 - 2
tracim/tracim/lib/email_fetcher.py 파일 보기

@@ -158,7 +158,7 @@ class MailFetcher(object):
158 158
         token: str,
159 159
         use_html_parsing: bool,
160 160
         use_txt_parsing: bool,
161
-        filelock_path: str,
161
+        lockfile_path: str,
162 162
     ) -> None:
163 163
         """
164 164
         Fetch mail from a mailbox folder through IMAP and add their content to
@@ -188,7 +188,7 @@ class MailFetcher(object):
188 188
         self.token = token
189 189
         self.use_html_parsing = use_html_parsing
190 190
         self.use_txt_parsing = use_txt_parsing
191
-        self.lock = filelock.FileLock(filelock_path)
191
+        self.lock = filelock.FileLock(lockfile_path)
192 192
         self._is_active = True
193 193
 
194 194
     def run(self) -> None: