def process_request(self, request):
        now = timezone.now()
        delta = timedelta(seconds=forum_settings.USER_ONLINE_TIMEOUT) - now
        users_online = cache.get('djangobb_users_online', {})
        guests_online = cache.get('djangobb_guests_online', {})

        if request.user.is_authenticated():
            users_online[request.user.id] = now
        else:
            guest_sid = request.COOKIES.get(global_settings.SESSION_COOKIE_NAME, '')
            guests_online[guest_sid] = now

        for user_id in list(users_online.keys()):
            if users_online[user_id] < delta:
                del users_online[user_id]

        for guest_id in list(guests_online.keys()):
            if guests_online[guest_id] < delta:
                del guests_online[guest_id]

        cache.set('djangobb_users_online', users_online, 60*60*24)
        cache.set('djangobb_guests_online', guests_online, 60*60*24)
dataset/ETHPy150Open slav0nic/djangobb/djangobb_forum/middleware.py/UsersOnline.process_request/swapped operands of `-`