Skip to content

Commit

Permalink
printing out data size before the remove block goes into effect
Browse files Browse the repository at this point in the history
  • Loading branch information
abdollahis2 authored and abdollahis2 committed Jan 18, 2024
1 parent 01ca237 commit e206af7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ scipy
django-celery-beat
statistics
sympy
objsize
4 changes: 3 additions & 1 deletion tr_sys/tr_ars/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import json
import logging
import traceback
import os
import os, sys
from datetime import time, datetime
from django.db import transaction
import requests
Expand All @@ -16,6 +16,7 @@
import typing
import time as sleeptime
import re
from objsize import get_deep_size
from .scoring import compute_from_results
from collections import Counter

Expand Down Expand Up @@ -666,6 +667,7 @@ def merge_and_post_process(parent_pk,message_to_merge, agent_name, counter=0):

def remove_blocked(mesg, data, blocklist=None):
try:
logging.info("Getting the length of the dictionary in {} bytes".format(get_deep_size(data)))
if blocklist is None:
path = os.path.join(os.path.dirname(__file__), "..", "..", "config", "blocklist.json")
f = open(path)
Expand Down

0 comments on commit e206af7

Please sign in to comment.