Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / intSugarcrmConfiguration / intSugarcrmConfiguration.rpc.js
index 4bb5f39..6545d86 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9fbe=['SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info'];(function(_0x1a522f,_0x172efe){var _0x2aa18c=function(_0x136bc5){while(--_0x136bc5){_0x1a522f['push'](_0x1a522f['shift']());}};_0x2aa18c(++_0x172efe);}(_0x9fbe,0x152));var _0xe9fb=function(_0x5a2299,_0x3e2922){_0x5a2299=_0x5a2299-0x0;var _0xedff0f=_0x9fbe[_0x5a2299];return _0xedff0f;};'use strict';var _=require(_0xe9fb('0x0'));var util=require(_0xe9fb('0x1'));var moment=require(_0xe9fb('0x2'));var BPromise=require(_0xe9fb('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe9fb('0x4'));var db=require(_0xe9fb('0x5'))['db'];var utils=require(_0xe9fb('0x6'));var logger=require(_0xe9fb('0x7'))('rpc');var config=require(_0xe9fb('0x8'));var jayson=require(_0xe9fb('0x9'));var client=jayson[_0xe9fb('0xa')][_0xe9fb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x550182,_0x50edf3,_0x2afccd){return new BPromise(function(_0x59dca6,_0x59cf40){return client['request'](_0x550182,_0x2afccd)[_0xe9fb('0xc')](function(_0x1f5b26){logger[_0xe9fb('0xd')](_0xe9fb('0xe'),_0x50edf3,_0xe9fb('0xf'));logger['debug']('SugarcrmConfiguration,\x20%s,\x20%s,\x20%s',_0x50edf3,_0xe9fb('0xf'),JSON[_0xe9fb('0x10')](_0x1f5b26));if(_0x1f5b26[_0xe9fb('0x11')]){if(_0x1f5b26[_0xe9fb('0x11')][_0xe9fb('0x12')]===0x1f4){logger['error'](_0xe9fb('0xe'),_0x50edf3,_0x1f5b26[_0xe9fb('0x11')][_0xe9fb('0x13')]);return _0x59cf40(_0x1f5b26[_0xe9fb('0x11')][_0xe9fb('0x13')]);}logger[_0xe9fb('0x11')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x50edf3,_0x1f5b26[_0xe9fb('0x11')][_0xe9fb('0x13')]);return _0x59dca6(_0x1f5b26[_0xe9fb('0x11')][_0xe9fb('0x13')]);}else{logger[_0xe9fb('0xd')](_0xe9fb('0xe'),_0x50edf3,_0xe9fb('0xf'));_0x59dca6(_0x1f5b26[_0xe9fb('0x14')]['message']);}})[_0xe9fb('0x15')](function(_0x2f4ef4){logger[_0xe9fb('0x11')](_0xe9fb('0xe'),_0x50edf3,_0x2f4ef4);_0x59cf40(_0x2f4ef4);});});}
\ No newline at end of file
+var _0x55f6=['../../config/utils','rpc','../../config/environment','client','http','request','then','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','bluebird','randomstring','ioredis'];(function(_0x64bfc4,_0x46d7fe){var _0x4f6d04=function(_0x4db4bd){while(--_0x4db4bd){_0x64bfc4['push'](_0x64bfc4['shift']());}};_0x4f6d04(++_0x46d7fe);}(_0x55f6,0x1ca));var _0x655f=function(_0x3a5a8d,_0x22dac9){_0x3a5a8d=_0x3a5a8d-0x0;var _0x1b94b7=_0x55f6[_0x3a5a8d];return _0x1b94b7;};'use strict';var _=require(_0x655f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x655f('0x1'));var rs=require(_0x655f('0x2'));var fs=require('fs');var Redis=require(_0x655f('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x655f('0x4'));var logger=require('../../config/logger')(_0x655f('0x5'));var config=require(_0x655f('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x655f('0x7')][_0x655f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1f0e92,_0x4bd8a9,_0x2daa6e){return new BPromise(function(_0x553502,_0x48119f){return client[_0x655f('0x9')](_0x1f0e92,_0x2daa6e)[_0x655f('0xa')](function(_0x4d91c9){logger['info'](_0x655f('0xb'),_0x4bd8a9,_0x655f('0xc'));logger['debug'](_0x655f('0xd'),_0x4bd8a9,'request\x20sent',JSON[_0x655f('0xe')](_0x4d91c9));if(_0x4d91c9['error']){if(_0x4d91c9[_0x655f('0xf')][_0x655f('0x10')]===0x1f4){logger['error'](_0x655f('0xb'),_0x4bd8a9,_0x4d91c9[_0x655f('0xf')]['message']);return _0x48119f(_0x4d91c9[_0x655f('0xf')][_0x655f('0x11')]);}logger[_0x655f('0xf')](_0x655f('0xb'),_0x4bd8a9,_0x4d91c9[_0x655f('0xf')][_0x655f('0x11')]);return _0x553502(_0x4d91c9[_0x655f('0xf')]['message']);}else{logger[_0x655f('0x12')](_0x655f('0xb'),_0x4bd8a9,_0x655f('0xc'));_0x553502(_0x4d91c9[_0x655f('0x13')][_0x655f('0x11')]);}})[_0x655f('0x14')](function(_0x482d46){logger[_0x655f('0xf')](_0x655f('0xb'),_0x4bd8a9,_0x482d46);_0x48119f(_0x482d46);});});}
\ No newline at end of file