lib/imperituroard/projects/mhub.rb in imperituroard-1.1.13 vs lib/imperituroard/projects/mhub.rb in imperituroard-1.1.14

- old
+ new

@@ -33,11 +33,11 @@ @sk_password = sk_password @log_level = log_level @internal_func = InternalFunc.new @mhub_connector = Sksk_2.new(sk_url_simple, sk_login, sk_password, sk_url_broadcast, telegram_api_url, telegram_chat_id, log_level) @internal_func = InternalFunc.new - @dabrab_connecter = Dabrab.new + @dabrab_connecter = Dabrab.new(log_level) @telegram_connector = Telegram_2.new(telegram_api_url, telegram_chat_id) @static_callback = static_callback @crm_connector = Crm_2.new(crm_callback_url, crm_login, crm_password, telegram_api_url, telegram_chat_id, log_level) @sms_alphaname = sms_alphaname end @@ -181,17 +181,17 @@ end #for bank dabrabyt - def rec_deliv_report_2(params, ip_src, ip_real, ip_vip) + def rec_deliv_report_2(params, ip_src, ip_real, ip_vip, crm_slice_num=2) input_params = {:params => params, :ip_src => ip_src, :ip_real => ip_real, :ip_vip => ip_vip} output_params = {} hub_resp = {} begin mes_report = dabrab_connecter.delivery_report_transform(params)[:body][:report_to_recip] - result = crm_connector.crm_status_2(mes_report) + result = crm_connector.crm_status_2(mes_report, crm_slice_num) if result[:body][:res_body]["GetReportsResult"]=="" output_params = {"code": 200, "result": "Data processed", "body": {"answer": {"code": 200, "status": "Success"}, "sender": {"ip_src": ip_src, "ip_real": ip_real, "ip_vip": ip_vip}}} else output_params = {"code": 202, "result": "CRM returned error #{result[:body][:res_body]["GetReportsResult"].to_s}", "body": {"answer": {"code": 200, "status": "Success"}, "sender": {"ip_src": ip_src, "ip_real": ip_real, "ip_vip": ip_vip}}} end