Built motion from commit f623a78c.|2.6.31
[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 _0x076b=['../../config/environment','client','http','then','info','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','VoiceQueuesLog,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x273c39,_0x1052e6){var _0x46d6b5=function(_0x44f1fb){while(--_0x44f1fb){_0x273c39['push'](_0x273c39['shift']());}};_0x46d6b5(++_0x1052e6);}(_0x076b,0x76));var _0xb076=function(_0x372448,_0x1aec0c){_0x372448=_0x372448-0x0;var _0x144f5d=_0x076b[_0x372448];return _0x144f5d;};'use strict';var _=require(_0xb076('0x0'));var util=require(_0xb076('0x1'));var moment=require(_0xb076('0x2'));var BPromise=require(_0xb076('0x3'));var rs=require(_0xb076('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb076('0x5'))['db'];var utils=require(_0xb076('0x6'));var logger=require(_0xb076('0x7'))('rpc');var config=require(_0xb076('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xb076('0x9')][_0xb076('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2562d5,_0x215362,_0x388afc){return new BPromise(function(_0x538b52,_0x4eb6d2){return client['request'](_0x2562d5,_0x388afc)[_0xb076('0xb')](function(_0x37a573){logger[_0xb076('0xc')]('VoiceQueuesLog,\x20%s,\x20%s',_0x215362,'request\x20sent');logger['debug'](_0xb076('0xd'),_0x215362,_0xb076('0xe'),JSON['stringify'](_0x37a573));if(_0x37a573[_0xb076('0xf')]){if(_0x37a573[_0xb076('0xf')][_0xb076('0x10')]===0x1f4){logger[_0xb076('0xf')]('VoiceQueuesLog,\x20%s,\x20%s',_0x215362,_0x37a573[_0xb076('0xf')]['message']);return _0x4eb6d2(_0x37a573['error'][_0xb076('0x11')]);}logger[_0xb076('0xf')](_0xb076('0x12'),_0x215362,_0x37a573['error']['message']);return _0x538b52(_0x37a573[_0xb076('0xf')][_0xb076('0x11')]);}else{logger[_0xb076('0xc')](_0xb076('0x12'),_0x215362,_0xb076('0xe'));_0x538b52(_0x37a573[_0xb076('0x13')][_0xb076('0x11')]);}})[_0xb076('0x14')](function(_0x260f74){logger[_0xb076('0xf')](_0xb076('0x12'),_0x215362,_0x260f74);_0x4eb6d2(_0x260f74);});});}