forked from p15670423/monkey
Save some space
This commit is contained in:
parent
86a0e47d15
commit
70766e7358
|
@ -24,6 +24,8 @@ class Log(flask_restful.Resource):
|
||||||
telemetry_json = json.loads(request.data)
|
telemetry_json = json.loads(request.data)
|
||||||
|
|
||||||
monkey_id = NodeService.get_monkey_by_guid(telemetry_json['monkey_guid'])['_id']
|
monkey_id = NodeService.get_monkey_by_guid(telemetry_json['monkey_guid'])['_id']
|
||||||
log_id = LogService.add_log(monkey_id, telemetry_json['log'])
|
# This is base64 so no data will be lost. this'll take 2 time less space.
|
||||||
|
log_data = str(telemetry_json['log'])
|
||||||
|
log_id = LogService.add_log(monkey_id, log_data)
|
||||||
|
|
||||||
return mongo.db.log.find_one_or_404({"_id": log_id})
|
return mongo.db.log.find_one_or_404({"_id": log_id})
|
||||||
|
|
Loading…
Reference in New Issue