Optimized memory objects usage for status check endpoint

This commit is contained in:
Illia Chub 2021-11-16 12:06:36 +02:00
parent 5c4d871bcd
commit 59d251bb77
No known key found for this signature in database
GPG key ID: 5D3581534C02467A

View file

@ -55,8 +55,7 @@ class CheckBackupStatus(Resource):
backupStatusCheckCommand, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
backupProcessStatus = backupStatusCheckProcessDescriptor.communicate()[0]
backupProcessStatus = backupProcessStatus.decode("utf-8")
backupProcessStatus = backupStatusCheckProcessDescriptor.communicate()[0].decode("utf-8")
try:
json.loads(backupProcessStatus)