Built motion from commit (unavailable).|2.5.16
[motion2.git] / server / api / analyticExtractedReport / analyticExtractedReport.rpc.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xa5cc=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','AnalyticExtractedReport,\x20%s,\x20%s','debug','error','code','message','request\x20sent','result','lodash'];(function(_0x3ea196,_0x19f049){var _0xc8e6d3=function(_0x328cc5){while(--_0x328cc5){_0x3ea196['push'](_0x3ea196['shift']());}};_0xc8e6d3(++_0x19f049);}(_0xa5cc,0xaf));var _0xca5c=function(_0x1a72f3,_0x217011){_0x1a72f3=_0x1a72f3-0x0;var _0x57ef47=_0xa5cc[_0x1a72f3];return _0x57ef47;};'use strict';var _=require(_0xca5c('0x0'));var util=require(_0xca5c('0x1'));var moment=require(_0xca5c('0x2'));var BPromise=require(_0xca5c('0x3'));var rs=require(_0xca5c('0x4'));var fs=require('fs');var Redis=require(_0xca5c('0x5'));var db=require(_0xca5c('0x6'))['db'];var utils=require(_0xca5c('0x7'));var logger=require(_0xca5c('0x8'))('rpc');var config=require(_0xca5c('0x9'));var jayson=require(_0xca5c('0xa'));var client=jayson[_0xca5c('0xb')][_0xca5c('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5740c2,_0x4afc83,_0x44215c){return new BPromise(function(_0x2e6df4,_0x1dde06){return client[_0xca5c('0xd')](_0x5740c2,_0x44215c)['then'](function(_0x32c196){logger[_0xca5c('0xe')](_0xca5c('0xf'),_0x4afc83,'request\x20sent');logger[_0xca5c('0x10')]('AnalyticExtractedReport,\x20%s,\x20%s,\x20%s',_0x4afc83,'request\x20sent',JSON['stringify'](_0x32c196));if(_0x32c196[_0xca5c('0x11')]){if(_0x32c196[_0xca5c('0x11')][_0xca5c('0x12')]===0x1f4){logger[_0xca5c('0x11')](_0xca5c('0xf'),_0x4afc83,_0x32c196[_0xca5c('0x11')][_0xca5c('0x13')]);return _0x1dde06(_0x32c196[_0xca5c('0x11')][_0xca5c('0x13')]);}logger[_0xca5c('0x11')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x4afc83,_0x32c196[_0xca5c('0x11')]['message']);return _0x2e6df4(_0x32c196['error'][_0xca5c('0x13')]);}else{logger[_0xca5c('0xe')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x4afc83,_0xca5c('0x14'));_0x2e6df4(_0x32c196[_0xca5c('0x15')][_0xca5c('0x13')]);}})['catch'](function(_0x3bc815){logger['error']('AnalyticExtractedReport,\x20%s,\x20%s',_0x4afc83,_0x3bc815);_0x1dde06(_0x3bc815);});});}