Skip to content

Commit

Permalink
Clear memory more actively
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-nelson committed Sep 23, 2016
1 parent 1fc2465 commit 5f43ac2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions osmhm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ def run(time_type='hour', history=False, suspicious=False, monitor=True,
time.sleep(60)

data_object = osmdt.process(data_stream)
del data_stream

changesets = osmdt.extract_changesets(data_object)
objects = osmdt.extract_objects(data_object)
users = osmdt.extract_users(data_object)
del data_object

if history:
osmhm.inserts.insert_all_changesets(changesets)
Expand All @@ -57,6 +59,8 @@ def run(time_type='hour', history=False, suspicious=False, monitor=True,
#osmhm.filters.user_object_filter(objects, notification=notification, notifier=notifier) # not implemented yet
osmhm.filters.key_filter(objects, notification=notification, notifier=notifier)

del changesets, objects, users

osmhm.inserts.insert_file_read()
print "Finished processing %s." % (sequence['sequencenumber'])

Expand Down

0 comments on commit 5f43ac2

Please sign in to comment.