Built motion from commit a679711e.|2.6.15
[motion2.git] / server / api / intFreshsalesField / intFreshsalesField.rpc.js
index 79d5d0f..d36de01 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe4e2=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','FreshsalesField,\x20%s,\x20%s','request\x20sent','debug','FreshsalesField,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','lodash','bluebird','randomstring','../../config/utils'];(function(_0x475a77,_0x140572){var _0x2719c6=function(_0x3c99ca){while(--_0x3c99ca){_0x475a77['push'](_0x475a77['shift']());}};_0x2719c6(++_0x140572);}(_0xe4e2,0x65));var _0x2e4e=function(_0x196ddc,_0x514491){_0x196ddc=_0x196ddc-0x0;var _0x5d15f2=_0xe4e2[_0x196ddc];return _0x5d15f2;};'use strict';var _=require(_0x2e4e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x2e4e('0x1'));var rs=require(_0x2e4e('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x2e4e('0x3'));var logger=require(_0x2e4e('0x4'))(_0x2e4e('0x5'));var config=require(_0x2e4e('0x6'));var jayson=require(_0x2e4e('0x7'));var client=jayson[_0x2e4e('0x8')][_0x2e4e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x566be6,_0xc156ee,_0x4d2dd0){return new BPromise(function(_0x5ae03d,_0x2c5b74){return client['request'](_0x566be6,_0x4d2dd0)[_0x2e4e('0xa')](function(_0x4fcc73){logger['info'](_0x2e4e('0xb'),_0xc156ee,_0x2e4e('0xc'));logger[_0x2e4e('0xd')](_0x2e4e('0xe'),_0xc156ee,'request\x20sent',JSON['stringify'](_0x4fcc73));if(_0x4fcc73[_0x2e4e('0xf')]){if(_0x4fcc73[_0x2e4e('0xf')][_0x2e4e('0x10')]===0x1f4){logger[_0x2e4e('0xf')](_0x2e4e('0xb'),_0xc156ee,_0x4fcc73[_0x2e4e('0xf')][_0x2e4e('0x11')]);return _0x2c5b74(_0x4fcc73[_0x2e4e('0xf')][_0x2e4e('0x11')]);}logger[_0x2e4e('0xf')](_0x2e4e('0xb'),_0xc156ee,_0x4fcc73[_0x2e4e('0xf')][_0x2e4e('0x11')]);return _0x5ae03d(_0x4fcc73[_0x2e4e('0xf')][_0x2e4e('0x11')]);}else{logger[_0x2e4e('0x12')](_0x2e4e('0xb'),_0xc156ee,_0x2e4e('0xc'));_0x5ae03d(_0x4fcc73[_0x2e4e('0x13')][_0x2e4e('0x11')]);}})[_0x2e4e('0x14')](function(_0x3c63c0){logger['error']('FreshsalesField,\x20%s,\x20%s',_0xc156ee,_0x3c63c0);_0x2c5b74(_0x3c63c0);});});}
\ No newline at end of file
+var _0xbd51=['FreshsalesField,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/environment','jayson/promise','client','then','info','FreshsalesField,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xbd51,0x1a8));var _0x1bd5=function(_0x31b702,_0x45394c){_0x31b702=_0x31b702-0x0;var _0x3b4a44=_0xbd51[_0x31b702];return _0x3b4a44;};'use strict';var _=require(_0x1bd5('0x0'));var util=require('util');var moment=require(_0x1bd5('0x1'));var BPromise=require(_0x1bd5('0x2'));var rs=require(_0x1bd5('0x3'));var fs=require('fs');var Redis=require(_0x1bd5('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x1bd5('0x5'));var jayson=require(_0x1bd5('0x6'));var client=jayson[_0x1bd5('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x29abea,_0x30a385,_0x19077c){return new BPromise(function(_0x27d58f,_0xd8418f){return client['request'](_0x29abea,_0x19077c)[_0x1bd5('0x8')](function(_0x5c8e0d){logger[_0x1bd5('0x9')](_0x1bd5('0xa'),_0x30a385,_0x1bd5('0xb'));logger[_0x1bd5('0xc')](_0x1bd5('0xd'),_0x30a385,_0x1bd5('0xb'),JSON['stringify'](_0x5c8e0d));if(_0x5c8e0d[_0x1bd5('0xe')]){if(_0x5c8e0d['error'][_0x1bd5('0xf')]===0x1f4){logger[_0x1bd5('0xe')](_0x1bd5('0xa'),_0x30a385,_0x5c8e0d[_0x1bd5('0xe')][_0x1bd5('0x10')]);return _0xd8418f(_0x5c8e0d[_0x1bd5('0xe')][_0x1bd5('0x10')]);}logger['error']('FreshsalesField,\x20%s,\x20%s',_0x30a385,_0x5c8e0d[_0x1bd5('0xe')][_0x1bd5('0x10')]);return _0x27d58f(_0x5c8e0d[_0x1bd5('0xe')][_0x1bd5('0x10')]);}else{logger['info']('FreshsalesField,\x20%s,\x20%s',_0x30a385,_0x1bd5('0xb'));_0x27d58f(_0x5c8e0d[_0x1bd5('0x11')][_0x1bd5('0x10')]);}})[_0x1bd5('0x12')](function(_0x43ea3e){logger[_0x1bd5('0xe')](_0x1bd5('0xa'),_0x30a385,_0x43ea3e);_0xd8418f(_0x43ea3e);});});}
\ No newline at end of file