Skip to content

Commit

Permalink
Implement caching for gv. See #452
Browse files Browse the repository at this point in the history
  • Loading branch information
breyten committed Jan 26, 2024
1 parent 6e5020b commit a82e6d7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ocd_backend/extractors/gv.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ def run(self):

total_meetings = 0
for item in super(GreenValleyMeetingsExtractor, self).run():
yield item[0], item[1], item[2], item[3]
total_meetings += 1
ot = ",".join(self.source_definition['greenvalley_objecttypes'])
mt = json.loads(item[1])
if not self.check_if_most_recent('gv', self.source_definition["key"], ot, item[1], mt['objectid']):
yield item[0], item[1], item[2], item[3]
total_meetings += 1

log.info(f'[{self.source_definition["key"]}] Extracting total of {total_meetings} GreenValley meetings')

0 comments on commit a82e6d7

Please sign in to comment.