Skip to content

Commit

Permalink
#12: Fixed few bugs found by tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bystroushaak committed Nov 3, 2015
1 parent 4d4daa9 commit eaaf65f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/edeposit/amqp/rest/database/status_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def remove_status_info(self, rest_id, username=None):
# remove from id->username mapping
stored_username = self.id_to_username.get(rest_id, None)
if stored_username:
del self.id_to_username[stored_username]
del self.id_to_username[rest_id]
username = stored_username

# remove from username->ids mapping
Expand All @@ -275,7 +275,7 @@ def trigger_garbage_collection(self, interval=YEAR/2):
garbage_rest_ids = [
status_info.rest_id
for status_info in self.status_db.values()
if status_info.registered_ts + interval >= time.time()
if status_info.registered_ts + interval <= time.time()
]

self.log(
Expand Down

0 comments on commit eaaf65f

Please sign in to comment.