Built motion from commit 97153652.|2.6.26
[motion2.git] / server / api / voiceQueuesLog / voiceQueuesLog.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 _0x05cc=['request\x20sent','debug','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','VoiceQueuesLog,\x20%s,\x20%s'];(function(_0x5e8f36,_0x41620a){var _0x25430a=function(_0x4e9800){while(--_0x4e9800){_0x5e8f36['push'](_0x5e8f36['shift']());}};_0x25430a(++_0x41620a);}(_0x05cc,0xd9));var _0xc05c=function(_0x40502f,_0x5aff42){_0x40502f=_0x40502f-0x0;var _0x12a5b9=_0x05cc[_0x40502f];return _0x12a5b9;};'use strict';var _=require(_0xc05c('0x0'));var util=require(_0xc05c('0x1'));var moment=require(_0xc05c('0x2'));var BPromise=require(_0xc05c('0x3'));var rs=require(_0xc05c('0x4'));var fs=require('fs');var Redis=require(_0xc05c('0x5'));var db=require(_0xc05c('0x6'))['db'];var utils=require(_0xc05c('0x7'));var logger=require(_0xc05c('0x8'))(_0xc05c('0x9'));var config=require(_0xc05c('0xa'));var jayson=require(_0xc05c('0xb'));var client=jayson[_0xc05c('0xc')][_0xc05c('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x590308,_0x5943be,_0x4578c7){return new BPromise(function(_0x36450,_0x31134a){return client[_0xc05c('0xe')](_0x590308,_0x4578c7)['then'](function(_0x1ca4d9){logger[_0xc05c('0xf')](_0xc05c('0x10'),_0x5943be,_0xc05c('0x11'));logger[_0xc05c('0x12')](_0xc05c('0x13'),_0x5943be,_0xc05c('0x11'),JSON[_0xc05c('0x14')](_0x1ca4d9));if(_0x1ca4d9[_0xc05c('0x15')]){if(_0x1ca4d9[_0xc05c('0x15')][_0xc05c('0x16')]===0x1f4){logger['error']('VoiceQueuesLog,\x20%s,\x20%s',_0x5943be,_0x1ca4d9['error'][_0xc05c('0x17')]);return _0x31134a(_0x1ca4d9[_0xc05c('0x15')][_0xc05c('0x17')]);}logger['error'](_0xc05c('0x10'),_0x5943be,_0x1ca4d9['error'][_0xc05c('0x17')]);return _0x36450(_0x1ca4d9[_0xc05c('0x15')][_0xc05c('0x17')]);}else{logger[_0xc05c('0xf')](_0xc05c('0x10'),_0x5943be,'request\x20sent');_0x36450(_0x1ca4d9[_0xc05c('0x18')][_0xc05c('0x17')]);}})[_0xc05c('0x19')](function(_0x496fb0){logger['error'](_0xc05c('0x10'),_0x5943be,_0x496fb0);_0x31134a(_0x496fb0);});});}