From 97bf5c4ff10804502ccd1868da81eb65d078abd1 Mon Sep 17 00:00:00 2001 From: Josh Williams Date: Tue, 24 Sep 2013 17:18:11 -0400 Subject: [PATCH] Mark document as is_processed=True to avoid loop The .save() immediately following this checked is_processed, found it to be False, and kicked off a whole new processing task; lather, rinse, repeat. We may want to refactor something else, but this fixes that for now. --- karmaworld/apps/notes/gdrive.py | 1 + 1 file changed, 1 insertion(+) diff --git a/karmaworld/apps/notes/gdrive.py b/karmaworld/apps/notes/gdrive.py index 605ea01..3b35c39 100644 --- a/karmaworld/apps/notes/gdrive.py +++ b/karmaworld/apps/notes/gdrive.py @@ -251,6 +251,7 @@ def convert_raw_document(raw_document): content_dict = download_from_gdrive(file_dict, http, mimetype=raw_document.mimetype) # this should have already happened, lets see why it hasn't + raw_document.is_processed = True raw_document.save() note = raw_document.convert_to_note() -- 2.25.1