Fix connections
This commit is contained in:
@@ -218,11 +218,7 @@ def send_object_replication(bndname, ws, ids):
|
|||||||
response_files = [{'name': os.path.basename(filepath), 'url': filepath, 'size': os.path.getsize(filepath)}]
|
response_files = [{'name': os.path.basename(filepath), 'url': filepath, 'size': os.path.getsize(filepath)}]
|
||||||
logger.warning(response_files)
|
logger.warning(response_files)
|
||||||
logging.debug('Send replication package')
|
logging.debug('Send replication package')
|
||||||
proxy = ServerProxy(Config.enserver)
|
send_response(params, response_files, Config.ret_path)
|
||||||
try:
|
|
||||||
proxy.send(params, response_files, Config.ret_path)
|
|
||||||
except:
|
|
||||||
logger.error('Error sending')
|
|
||||||
|
|
||||||
|
|
||||||
def replication_old(bnd_name: str, commit_id: str, schema: str):
|
def replication_old(bnd_name: str, commit_id: str, schema: str):
|
||||||
@@ -323,11 +319,7 @@ def replication(bnd_name: str, commit_id: str, schema: str):
|
|||||||
response_files = [{'name': os.path.basename(filepath), 'url': filepath, 'size': os.path.getsize(filepath)}]
|
response_files = [{'name': os.path.basename(filepath), 'url': filepath, 'size': os.path.getsize(filepath)}]
|
||||||
logger.warning(response_files)
|
logger.warning(response_files)
|
||||||
logging.debug('Send replication package')
|
logging.debug('Send replication package')
|
||||||
proxy = ServerProxy(Config.enserver)
|
send_response(response_params, response_files, Config.ret_path)
|
||||||
try:
|
|
||||||
proxy.send(response_params, response_files, Config.ret_path)
|
|
||||||
except:
|
|
||||||
logger.error('Error sending')
|
|
||||||
|
|
||||||
|
|
||||||
def pika_callback(ch, method, properties, body):
|
def pika_callback(ch, method, properties, body):
|
||||||
@@ -384,8 +376,8 @@ def send_response(params, files, url):
|
|||||||
files_s3 = []
|
files_s3 = []
|
||||||
for file in files:
|
for file in files:
|
||||||
fn = uuid4().hex
|
fn = uuid4().hex
|
||||||
upload_file(file['url'], fn, Config.s3_bucket)
|
upload_file(file['url'], fn, Config.s3_bucket_itv)
|
||||||
file['url'] = {'name': fn, 'bucket': Config.s3_bucket}
|
file['url'] = {'name': fn, 'bucket': Config.s3_bucket_itv}
|
||||||
files_s3.append(file)
|
files_s3.append(file)
|
||||||
data = {
|
data = {
|
||||||
'params': params,
|
'params': params,
|
||||||
|
|||||||
Reference in New Issue
Block a user