Built motion from commit ab870f9e.|2.5.44
[motion2.git] / server / api / intSalesforceField / intSalesforceField.rpc.js
index 9473503..ce5b4dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x52d3=['SalesforceField,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','request','SalesforceField,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x4a3b20,_0x11a8f1){var _0x531865=function(_0x45d5db){while(--_0x45d5db){_0x4a3b20['push'](_0x4a3b20['shift']());}};_0x531865(++_0x11a8f1);}(_0x52d3,0x78));var _0x352d=function(_0x1c6aac,_0x58989e){_0x1c6aac=_0x1c6aac-0x0;var _0x2834b4=_0x52d3[_0x1c6aac];return _0x2834b4;};'use strict';var _=require(_0x352d('0x0'));var util=require(_0x352d('0x1'));var moment=require('moment');var BPromise=require(_0x352d('0x2'));var rs=require(_0x352d('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x352d('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x352d('0x5'))('rpc');var config=require(_0x352d('0x6'));var jayson=require(_0x352d('0x7'));var client=jayson[_0x352d('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1ffc52,_0x46a042,_0x79d02b){return new BPromise(function(_0x12b578,_0x1175d7){return client[_0x352d('0x9')](_0x1ffc52,_0x79d02b)['then'](function(_0x19a8dd){logger['info'](_0x352d('0xa'),_0x46a042,_0x352d('0xb'));logger[_0x352d('0xc')](_0x352d('0xd'),_0x46a042,'request\x20sent',JSON[_0x352d('0xe')](_0x19a8dd));if(_0x19a8dd['error']){if(_0x19a8dd['error']['code']===0x1f4){logger[_0x352d('0xf')](_0x352d('0xa'),_0x46a042,_0x19a8dd[_0x352d('0xf')][_0x352d('0x10')]);return _0x1175d7(_0x19a8dd[_0x352d('0xf')][_0x352d('0x10')]);}logger['error']('SalesforceField,\x20%s,\x20%s',_0x46a042,_0x19a8dd[_0x352d('0xf')]['message']);return _0x12b578(_0x19a8dd[_0x352d('0xf')][_0x352d('0x10')]);}else{logger[_0x352d('0x11')]('SalesforceField,\x20%s,\x20%s',_0x46a042,_0x352d('0xb'));_0x12b578(_0x19a8dd['result'][_0x352d('0x10')]);}})[_0x352d('0x12')](function(_0x3a5a38){logger[_0x352d('0xf')](_0x352d('0xa'),_0x46a042,_0x3a5a38);_0x1175d7(_0x3a5a38);});});}
\ No newline at end of file
+var _0x28f9=['info','SalesforceField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','SalesforceField,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','then'];(function(_0x5208d2,_0x1b4807){var _0x2a9cb5=function(_0x12fcf6){while(--_0x12fcf6){_0x5208d2['push'](_0x5208d2['shift']());}};_0x2a9cb5(++_0x1b4807);}(_0x28f9,0x180));var _0x928f=function(_0x115926,_0x18c1e2){_0x115926=_0x115926-0x0;var _0x5999ab=_0x28f9[_0x115926];return _0x5999ab;};'use strict';var _=require(_0x928f('0x0'));var util=require(_0x928f('0x1'));var moment=require(_0x928f('0x2'));var BPromise=require('bluebird');var rs=require(_0x928f('0x3'));var fs=require('fs');var Redis=require(_0x928f('0x4'));var db=require(_0x928f('0x5'))['db'];var utils=require(_0x928f('0x6'));var logger=require('../../config/logger')(_0x928f('0x7'));var config=require(_0x928f('0x8'));var jayson=require(_0x928f('0x9'));var client=jayson['client'][_0x928f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x16176c,_0x1e5551,_0x2f563e){return new BPromise(function(_0xb7a66a,_0x2c67df){return client['request'](_0x16176c,_0x2f563e)[_0x928f('0xb')](function(_0x5e4c5d){logger[_0x928f('0xc')]('SalesforceField,\x20%s,\x20%s',_0x1e5551,'request\x20sent');logger['debug'](_0x928f('0xd'),_0x1e5551,_0x928f('0xe'),JSON[_0x928f('0xf')](_0x5e4c5d));if(_0x5e4c5d[_0x928f('0x10')]){if(_0x5e4c5d[_0x928f('0x10')][_0x928f('0x11')]===0x1f4){logger[_0x928f('0x10')](_0x928f('0x12'),_0x1e5551,_0x5e4c5d[_0x928f('0x10')][_0x928f('0x13')]);return _0x2c67df(_0x5e4c5d[_0x928f('0x10')][_0x928f('0x13')]);}logger[_0x928f('0x10')](_0x928f('0x12'),_0x1e5551,_0x5e4c5d[_0x928f('0x10')][_0x928f('0x13')]);return _0xb7a66a(_0x5e4c5d['error']['message']);}else{logger[_0x928f('0xc')]('SalesforceField,\x20%s,\x20%s',_0x1e5551,_0x928f('0xe'));_0xb7a66a(_0x5e4c5d[_0x928f('0x14')][_0x928f('0x13')]);}})[_0x928f('0x15')](function(_0x339783){logger['error']('SalesforceField,\x20%s,\x20%s',_0x1e5551,_0x339783);_0x2c67df(_0x339783);});});}
\ No newline at end of file