Skip to content

Commit

Permalink
chg: [global module] perf
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Mar 13, 2024
1 parent 6f2668e commit 8483272
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/modules/Global.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@ def computeNone(self):

def compute(self, message, r_result=False): # TODO move OBJ ID sanitization to importer
# Recovering the streamed message infos
gzip64encoded = message

if self.obj.type == 'item':
if gzip64encoded:
if message:

# Creating the full filepath
filename = os.path.join(self.ITEMS_FOLDER, self.obj.id)
Expand All @@ -97,7 +96,7 @@ def compute(self, message, r_result=False): # TODO move OBJ ID sanitization to i

else:
# Decode compressed base64
decoded = base64.standard_b64decode(gzip64encoded)
decoded = base64.standard_b64decode(message)
new_file_content = self.gunzip_bytes_obj(filename, decoded)

# TODO REWRITE ME
Expand Down

0 comments on commit 8483272

Please sign in to comment.