Built motion from commit (unavailable).|2.5.30
[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 _0xc656=['request\x20sent','debug','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','stringify','error','code','JscriptyQuestionReport,\x20%s,\x20%s','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then'];(function(_0x295811,_0x2825f4){var _0x147146=function(_0x939636){while(--_0x939636){_0x295811['push'](_0x295811['shift']());}};_0x147146(++_0x2825f4);}(_0xc656,0xec));var _0x6c65=function(_0x44ce55,_0x39eda8){_0x44ce55=_0x44ce55-0x0;var _0x5ea061=_0xc656[_0x44ce55];return _0x5ea061;};'use strict';var _=require('lodash');var util=require(_0x6c65('0x0'));var moment=require(_0x6c65('0x1'));var BPromise=require(_0x6c65('0x2'));var rs=require(_0x6c65('0x3'));var fs=require('fs');var Redis=require(_0x6c65('0x4'));var db=require(_0x6c65('0x5'))['db'];var utils=require(_0x6c65('0x6'));var logger=require(_0x6c65('0x7'))(_0x6c65('0x8'));var config=require(_0x6c65('0x9'));var jayson=require(_0x6c65('0xa'));var client=jayson[_0x6c65('0xb')][_0x6c65('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x314b68,_0x4bb4d6,_0x5db14d){return new BPromise(function(_0x179be9,_0x3cc8f9){return client['request'](_0x314b68,_0x5db14d)[_0x6c65('0xd')](function(_0x41c806){logger['info']('JscriptyQuestionReport,\x20%s,\x20%s',_0x4bb4d6,_0x6c65('0xe'));logger[_0x6c65('0xf')](_0x6c65('0x10'),_0x4bb4d6,'request\x20sent',JSON[_0x6c65('0x11')](_0x41c806));if(_0x41c806[_0x6c65('0x12')]){if(_0x41c806[_0x6c65('0x12')][_0x6c65('0x13')]===0x1f4){logger[_0x6c65('0x12')](_0x6c65('0x14'),_0x4bb4d6,_0x41c806['error'][_0x6c65('0x15')]);return _0x3cc8f9(_0x41c806[_0x6c65('0x12')][_0x6c65('0x15')]);}logger[_0x6c65('0x12')](_0x6c65('0x14'),_0x4bb4d6,_0x41c806[_0x6c65('0x12')]['message']);return _0x179be9(_0x41c806[_0x6c65('0x12')][_0x6c65('0x15')]);}else{logger[_0x6c65('0x16')](_0x6c65('0x14'),_0x4bb4d6,'request\x20sent');_0x179be9(_0x41c806[_0x6c65('0x17')][_0x6c65('0x15')]);}})[_0x6c65('0x18')](function(_0x4da658){logger[_0x6c65('0x12')](_0x6c65('0x14'),_0x4bb4d6,_0x4da658);_0x3cc8f9(_0x4da658);});});}