mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 12:28:44 +00:00
output_processors/postgres: Move logging message
Print the debug message warning about writing a large object to the database before writing the object.
This commit is contained in:
parent
f2f210c37f
commit
576df80379
@ -394,10 +394,10 @@ class PostgresqlResultProcessor(OutputProcessor):
|
||||
self.current_large_object_uuid = uuid.uuid4()
|
||||
with open(os.path.join(output_object.basepath, artifact.path)) as lobj_file:
|
||||
lobj_data = lobj_file.read()
|
||||
lo_len = self.current_lobj.write(lobj_data)
|
||||
if lo_len > 50000000: # Notify if LO inserts larger than 50MB
|
||||
if len(lobj_data) > 50000000: # Notify if LO inserts larger than 50MB
|
||||
self.logger.debug(
|
||||
"Inserting large object of size {}".format(lo_len))
|
||||
lo_len = self.current_lobj.write(lobj_data)
|
||||
self.cursor.execute(
|
||||
self.sql_command['create_large_object'],
|
||||
(
|
||||
|
Loading…
x
Reference in New Issue
Block a user