Built motion from commit da617fac.|2.6.6
[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 _0x4c0e=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','then','info','VoiceQueuesLog,\x20%s,\x20%s','debug','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment'];(function(_0x12b8ec,_0x1655be){var _0x21af77=function(_0xe59f){while(--_0xe59f){_0x12b8ec['push'](_0x12b8ec['shift']());}};_0x21af77(++_0x1655be);}(_0x4c0e,0x128));var _0xe4c0=function(_0x3c6ae2,_0x5c52d8){_0x3c6ae2=_0x3c6ae2-0x0;var _0x4edda=_0x4c0e[_0x3c6ae2];return _0x4edda;};'use strict';var _=require(_0xe4c0('0x0'));var util=require(_0xe4c0('0x1'));var moment=require(_0xe4c0('0x2'));var BPromise=require(_0xe4c0('0x3'));var rs=require(_0xe4c0('0x4'));var fs=require('fs');var Redis=require(_0xe4c0('0x5'));var db=require(_0xe4c0('0x6'))['db'];var utils=require(_0xe4c0('0x7'));var logger=require(_0xe4c0('0x8'))('rpc');var config=require(_0xe4c0('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xe4c0('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4488b0,_0x503cd9,_0x5dee9f){return new BPromise(function(_0x46fcfa,_0x3ab99d){return client['request'](_0x4488b0,_0x5dee9f)[_0xe4c0('0xb')](function(_0x15b3d0){logger[_0xe4c0('0xc')](_0xe4c0('0xd'),_0x503cd9,'request\x20sent');logger[_0xe4c0('0xe')](_0xe4c0('0xf'),_0x503cd9,_0xe4c0('0x10'),JSON[_0xe4c0('0x11')](_0x15b3d0));if(_0x15b3d0[_0xe4c0('0x12')]){if(_0x15b3d0[_0xe4c0('0x12')][_0xe4c0('0x13')]===0x1f4){logger[_0xe4c0('0x12')](_0xe4c0('0xd'),_0x503cd9,_0x15b3d0[_0xe4c0('0x12')][_0xe4c0('0x14')]);return _0x3ab99d(_0x15b3d0['error'][_0xe4c0('0x14')]);}logger[_0xe4c0('0x12')](_0xe4c0('0xd'),_0x503cd9,_0x15b3d0[_0xe4c0('0x12')]['message']);return _0x46fcfa(_0x15b3d0[_0xe4c0('0x12')][_0xe4c0('0x14')]);}else{logger[_0xe4c0('0xc')](_0xe4c0('0xd'),_0x503cd9,'request\x20sent');_0x46fcfa(_0x15b3d0[_0xe4c0('0x15')]['message']);}})[_0xe4c0('0x16')](function(_0x3d3bcf){logger[_0xe4c0('0x12')]('VoiceQueuesLog,\x20%s,\x20%s',_0x503cd9,_0x3d3bcf);_0x3ab99d(_0x3d3bcf);});});}