Add locking for interval sources. This reduces the chance of repeated documents from long running email downloads.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-04-10 02:25:40 -04:00
parent 3618778737
commit 64ad07d95d
6 changed files with 86 additions and 73 deletions

View File

@@ -551,10 +551,6 @@ class EmailBaseModel(IntervalBaseModel):
}
)
# TODO: Add lock to avoid running more than once concurrent same document
# download
# TODO: Use message ID for lock
@staticmethod
def process_message(source, message_text):
counter = 1