Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…geSearch into kinesis
  • Loading branch information
svebk committed Oct 9, 2019
2 parents 687d703 + 45f45be commit 48ff572
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cufacesearch/cufacesearch/ingester/kinesis_ingester.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def get_msg_json(self):
print(msg.format(self.pp, len(records)))
if self.verbose > 4:
lag_ms = rec_response['MillisBehindLatest']
msg = "[{}: log] Lagging by {.3f}s"
msg = "[{}: log] Lagging by {:.2f}s"
print(msg.format(self.pp, lag_ms/1000.0))
sleep_count = 0
for rec in records:
Expand Down Expand Up @@ -322,4 +322,4 @@ def get_msg_json(self):
time.sleep(1)
except Exception as inst:
msg = "[{}: ERROR] get_msg_json failed with error {}"
print(msg.format(self.pp, inst))
print(msg.format(self.pp, inst))
5 changes: 5 additions & 0 deletions cufacesearch/cufacesearch/updater/extraction_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,12 @@ def run(self, daemon=False):

if list_check_sha1s:
# Check which images have not been processed (or pushed in an update) yet
# This seems slow
start_check = time.time()
unprocessed_rows = self.get_unprocessed_rows(list_check_sha1s)
msg = "[{}: log] Found {}/{} unprocessed images in {:.2f}s"
print(msg.format(self.pp, len(unprocessed_rows), len(list_check_sha1s), time.time() - start_check))
#unprocessed_rows = self.get_unprocessed_rows(list_check_sha1s)
self.nb_imgs_check += len(list_check_sha1s)
push_delay = (time.time() - self.last_push) > self.max_delay / 60
if push_delay and self.nb_imgs_unproc_lastprint != self.nb_imgs_unproc:
Expand Down

0 comments on commit 48ff572

Please sign in to comment.