Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / jscriptyQuestionReport / jscriptyQuestionReport.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 _0xe367=['then','info','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','debug','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request'];(function(_0x5acaa1,_0x1bf7bd){var _0x217fbf=function(_0x29f134){while(--_0x29f134){_0x5acaa1['push'](_0x5acaa1['shift']());}};_0x217fbf(++_0x1bf7bd);}(_0xe367,0x151));var _0x7e36=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0xe367[_0x46e363];return _0x3fb059;};'use strict';var _=require(_0x7e36('0x0'));var util=require(_0x7e36('0x1'));var moment=require(_0x7e36('0x2'));var BPromise=require(_0x7e36('0x3'));var rs=require(_0x7e36('0x4'));var fs=require('fs');var Redis=require(_0x7e36('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x7e36('0x6'));var logger=require(_0x7e36('0x7'))(_0x7e36('0x8'));var config=require(_0x7e36('0x9'));var jayson=require(_0x7e36('0xa'));var client=jayson[_0x7e36('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x348a5f,_0x5aa0dc,_0x50d3fe){return new BPromise(function(_0x58e95e,_0x1e4e96){return client[_0x7e36('0xc')](_0x348a5f,_0x50d3fe)[_0x7e36('0xd')](function(_0x1d707e){logger[_0x7e36('0xe')](_0x7e36('0xf'),_0x5aa0dc,_0x7e36('0x10'));logger[_0x7e36('0x11')](_0x7e36('0x12'),_0x5aa0dc,_0x7e36('0x10'),JSON[_0x7e36('0x13')](_0x1d707e));if(_0x1d707e[_0x7e36('0x14')]){if(_0x1d707e[_0x7e36('0x14')][_0x7e36('0x15')]===0x1f4){logger[_0x7e36('0x14')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x5aa0dc,_0x1d707e[_0x7e36('0x14')]['message']);return _0x1e4e96(_0x1d707e[_0x7e36('0x14')][_0x7e36('0x16')]);}logger[_0x7e36('0x14')](_0x7e36('0xf'),_0x5aa0dc,_0x1d707e[_0x7e36('0x14')][_0x7e36('0x16')]);return _0x58e95e(_0x1d707e[_0x7e36('0x14')][_0x7e36('0x16')]);}else{logger['info'](_0x7e36('0xf'),_0x5aa0dc,'request\x20sent');_0x58e95e(_0x1d707e[_0x7e36('0x17')][_0x7e36('0x16')]);}})[_0x7e36('0x18')](function(_0x3741e4){logger['error'](_0x7e36('0xf'),_0x5aa0dc,_0x3741e4);_0x1e4e96(_0x3741e4);});});}