Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / api / intSalesforceField / intSalesforceField.rpc.js
index a83b061..a63c9a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xff5c=['request','then','info','SalesforceField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment'];(function(_0x2f09f7,_0x461707){var _0x1b266c=function(_0xbff8dc){while(--_0xbff8dc){_0x2f09f7['push'](_0x2f09f7['shift']());}};_0x1b266c(++_0x461707);}(_0xff5c,0x1c2));var _0xcff5=function(_0x57e92c,_0x2bdbb2){_0x57e92c=_0x57e92c-0x0;var _0x58c5dd=_0xff5c[_0x57e92c];return _0x58c5dd;};'use strict';var _=require(_0xcff5('0x0'));var util=require(_0xcff5('0x1'));var moment=require(_0xcff5('0x2'));var BPromise=require(_0xcff5('0x3'));var rs=require(_0xcff5('0x4'));var fs=require('fs');var Redis=require(_0xcff5('0x5'));var db=require(_0xcff5('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xcff5('0x7'))(_0xcff5('0x8'));var config=require(_0xcff5('0x9'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x588f6b,_0x32e6fa,_0x42f047){return new BPromise(function(_0x5d7d18,_0x5bda0c){return client[_0xcff5('0xa')](_0x588f6b,_0x42f047)[_0xcff5('0xb')](function(_0x8a07f){logger[_0xcff5('0xc')](_0xcff5('0xd'),_0x32e6fa,_0xcff5('0xe'));logger[_0xcff5('0xf')]('SalesforceField,\x20%s,\x20%s,\x20%s',_0x32e6fa,_0xcff5('0xe'),JSON[_0xcff5('0x10')](_0x8a07f));if(_0x8a07f[_0xcff5('0x11')]){if(_0x8a07f[_0xcff5('0x11')][_0xcff5('0x12')]===0x1f4){logger[_0xcff5('0x11')](_0xcff5('0xd'),_0x32e6fa,_0x8a07f[_0xcff5('0x11')][_0xcff5('0x13')]);return _0x5bda0c(_0x8a07f[_0xcff5('0x11')][_0xcff5('0x13')]);}logger[_0xcff5('0x11')](_0xcff5('0xd'),_0x32e6fa,_0x8a07f['error']['message']);return _0x5d7d18(_0x8a07f['error'][_0xcff5('0x13')]);}else{logger[_0xcff5('0xc')](_0xcff5('0xd'),_0x32e6fa,_0xcff5('0xe'));_0x5d7d18(_0x8a07f['result']['message']);}})['catch'](function(_0x2519d6){logger[_0xcff5('0x11')](_0xcff5('0xd'),_0x32e6fa,_0x2519d6);_0x5bda0c(_0x2519d6);});});}
\ No newline at end of file
+var _0x4bb5=['jayson/promise','client','http','request','info','SalesforceField,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x454643,_0x1c8611){var _0x4fa630=function(_0x338e04){while(--_0x338e04){_0x454643['push'](_0x454643['shift']());}};_0x4fa630(++_0x1c8611);}(_0x4bb5,0x114));var _0x54bb=function(_0x3a1af1,_0x13205c){_0x3a1af1=_0x3a1af1-0x0;var _0x5782c0=_0x4bb5[_0x3a1af1];return _0x5782c0;};'use strict';var _=require(_0x54bb('0x0'));var util=require('util');var moment=require(_0x54bb('0x1'));var BPromise=require(_0x54bb('0x2'));var rs=require(_0x54bb('0x3'));var fs=require('fs');var Redis=require(_0x54bb('0x4'));var db=require(_0x54bb('0x5'))['db'];var utils=require(_0x54bb('0x6'));var logger=require(_0x54bb('0x7'))(_0x54bb('0x8'));var config=require(_0x54bb('0x9'));var jayson=require(_0x54bb('0xa'));var client=jayson[_0x54bb('0xb')][_0x54bb('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2817cd,_0x3a99f0,_0x1aa15e){return new BPromise(function(_0x2e612b,_0x254521){return client[_0x54bb('0xd')](_0x2817cd,_0x1aa15e)['then'](function(_0x380e34){logger[_0x54bb('0xe')](_0x54bb('0xf'),_0x3a99f0,_0x54bb('0x10'));logger['debug']('SalesforceField,\x20%s,\x20%s,\x20%s',_0x3a99f0,_0x54bb('0x10'),JSON[_0x54bb('0x11')](_0x380e34));if(_0x380e34['error']){if(_0x380e34[_0x54bb('0x12')]['code']===0x1f4){logger['error'](_0x54bb('0xf'),_0x3a99f0,_0x380e34[_0x54bb('0x12')][_0x54bb('0x13')]);return _0x254521(_0x380e34[_0x54bb('0x12')][_0x54bb('0x13')]);}logger[_0x54bb('0x12')]('SalesforceField,\x20%s,\x20%s',_0x3a99f0,_0x380e34['error']['message']);return _0x2e612b(_0x380e34[_0x54bb('0x12')][_0x54bb('0x13')]);}else{logger['info']('SalesforceField,\x20%s,\x20%s',_0x3a99f0,_0x54bb('0x10'));_0x2e612b(_0x380e34[_0x54bb('0x14')][_0x54bb('0x13')]);}})[_0x54bb('0x15')](function(_0x1279ed){logger['error']('SalesforceField,\x20%s,\x20%s',_0x3a99f0,_0x1279ed);_0x254521(_0x1279ed);});});}
\ No newline at end of file