Compare commits

..

No commits in common. "300b6f46f1b4bd8fca0a11af90ceeb6329b8d29f" and "ef47e2c1fd836366f68628fb3827854b0db420c2" have entirely different histories.

View File

@ -1,4 +1,5 @@
import base64 import base64
import io
import json import json
import logging import logging
import os import os
@ -41,7 +42,7 @@ def on_message(channel, method_frame, header_frame, body):
try: try:
box_place = (body_content['signatureZone']['x'], body_content['signatureZone']['y'], box_place = (body_content['signatureZone']['x'], body_content['signatureZone']['y'],
body_content['signatureZone']['x'] + body_content['signatureZone']['width'], body_content['signatureZone']['x'] + body_content['signatureZone']['width'],
body_content['signatureZone']['y'] - body_content['signatureZone']['height']) body_content['signatureZone']['y'] + body_content['signatureZone']['height'])
LOGGER.debug("will try signature") LOGGER.debug("will try signature")
signed = orchestrator.sign(reason=body_content['reason'], signature_index=body_content['signatureZoneIndex'], signed = orchestrator.sign(reason=body_content['reason'], signature_index=body_content['signatureZoneIndex'],
box_place=box_place, on_page=body_content['signatureZone']['PDFPage']['index'], box_place=box_place, on_page=body_content['signatureZone']['PDFPage']['index'],
@ -58,7 +59,6 @@ def on_message(channel, method_frame, header_frame, body):
channel.basic_publish(exchange=EXCHANGE_OUT, channel.basic_publish(exchange=EXCHANGE_OUT,
body=json.dumps({'signatureId': body_content['signatureId'], body=json.dumps({'signatureId': body_content['signatureId'],
'signatureZoneIndex': body_content['signatureZoneIndex'],
'content': base64.b64encode(signed.read()).decode('utf-8')}), 'content': base64.b64encode(signed.read()).decode('utf-8')}),
properties=pika.BasicProperties(content_type='application/json', properties=pika.BasicProperties(content_type='application/json',
delivery_mode=pika.DeliveryMode.Transient), delivery_mode=pika.DeliveryMode.Transient),