Built motion from commit 1fd437e9.|2.6.19
[motion2.git] / server / api / openchannelAccount / openchannelAccount.rpc.js
index d18d3ea..8172c21 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd547=['request','then','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','OpenchannelAccount,\x20%s,\x20%s','message','info','result','catch','moment','bluebird','randomstring','ioredis','../../config/logger','../../config/environment','client','http','redis','socket.io-emitter','register'];(function(_0x5f309e,_0x66e31){var _0x487b5e=function(_0x44f203){while(--_0x44f203){_0x5f309e['push'](_0x5f309e['shift']());}};_0x487b5e(++_0x66e31);}(_0xd547,0x1c1));var _0x7d54=function(_0x57d4b2,_0x43236a){_0x57d4b2=_0x57d4b2-0x0;var _0x57fc1c=_0xd547[_0x57d4b2];return _0x57fc1c;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x7d54('0x0'));var BPromise=require(_0x7d54('0x1'));var rs=require(_0x7d54('0x2'));var fs=require('fs');var Redis=require(_0x7d54('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x7d54('0x4'))('rpc');var config=require(_0x7d54('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x7d54('0x6')][_0x7d54('0x7')]({'port':0x232a});config[_0x7d54('0x8')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x7d54('0x9'))(new Redis(config[_0x7d54('0x8')]));require('./openchannelAccount.socket')[_0x7d54('0xa')](socket);function respondWithRpcPromise(_0x48b250,_0x2bede6,_0x4d9dc3){return new BPromise(function(_0x1d7ff7,_0x570460){return client[_0x7d54('0xb')](_0x48b250,_0x4d9dc3)[_0x7d54('0xc')](function(_0x5bd01a){logger['info']('OpenchannelAccount,\x20%s,\x20%s',_0x2bede6,_0x7d54('0xd'));logger[_0x7d54('0xe')](_0x7d54('0xf'),_0x2bede6,'request\x20sent',JSON[_0x7d54('0x10')](_0x5bd01a));if(_0x5bd01a['error']){if(_0x5bd01a[_0x7d54('0x11')]['code']===0x1f4){logger[_0x7d54('0x11')](_0x7d54('0x12'),_0x2bede6,_0x5bd01a['error'][_0x7d54('0x13')]);return _0x570460(_0x5bd01a[_0x7d54('0x11')][_0x7d54('0x13')]);}logger['error'](_0x7d54('0x12'),_0x2bede6,_0x5bd01a[_0x7d54('0x11')][_0x7d54('0x13')]);return _0x1d7ff7(_0x5bd01a[_0x7d54('0x11')][_0x7d54('0x13')]);}else{logger[_0x7d54('0x14')]('OpenchannelAccount,\x20%s,\x20%s',_0x2bede6,_0x7d54('0xd'));_0x1d7ff7(_0x5bd01a[_0x7d54('0x15')]['message']);}})[_0x7d54('0x16')](function(_0x4b9caf){logger['error'](_0x7d54('0x12'),_0x2bede6,_0x4b9caf);_0x570460(_0x4b9caf);});});}
\ No newline at end of file
+var _0xa902=['client','http','redis','./openchannelAccount.socket','register','request','then','info','request\x20sent','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','OpenchannelAccount,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','rpc','../../config/environment','jayson/promise'];(function(_0x5d4cb5,_0x22025e){var _0x25561e=function(_0x4d792a){while(--_0x4d792a){_0x5d4cb5['push'](_0x5d4cb5['shift']());}};_0x25561e(++_0x22025e);}(_0xa902,0x8d));var _0x2a90=function(_0x520b59,_0x46ba85){_0x520b59=_0x520b59-0x0;var _0x4491dc=_0xa902[_0x520b59];return _0x4491dc;};'use strict';var _=require(_0x2a90('0x0'));var util=require(_0x2a90('0x1'));var moment=require(_0x2a90('0x2'));var BPromise=require(_0x2a90('0x3'));var rs=require(_0x2a90('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2a90('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x2a90('0x6'));var config=require(_0x2a90('0x7'));var jayson=require(_0x2a90('0x8'));var client=jayson[_0x2a90('0x9')][_0x2a90('0xa')]({'port':0x232a});config[_0x2a90('0xb')]=_['defaults'](config[_0x2a90('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2a90('0xb')]));require(_0x2a90('0xc'))[_0x2a90('0xd')](socket);function respondWithRpcPromise(_0x2b0a20,_0x18a60e,_0x56550f){return new BPromise(function(_0x361571,_0x3dadc2){return client[_0x2a90('0xe')](_0x2b0a20,_0x56550f)[_0x2a90('0xf')](function(_0x541e22){logger[_0x2a90('0x10')]('OpenchannelAccount,\x20%s,\x20%s',_0x18a60e,_0x2a90('0x11'));logger['debug'](_0x2a90('0x12'),_0x18a60e,'request\x20sent',JSON[_0x2a90('0x13')](_0x541e22));if(_0x541e22[_0x2a90('0x14')]){if(_0x541e22[_0x2a90('0x14')]['code']===0x1f4){logger['error']('OpenchannelAccount,\x20%s,\x20%s',_0x18a60e,_0x541e22[_0x2a90('0x14')][_0x2a90('0x15')]);return _0x3dadc2(_0x541e22['error'][_0x2a90('0x15')]);}logger[_0x2a90('0x14')](_0x2a90('0x16'),_0x18a60e,_0x541e22[_0x2a90('0x14')][_0x2a90('0x15')]);return _0x361571(_0x541e22[_0x2a90('0x14')][_0x2a90('0x15')]);}else{logger[_0x2a90('0x10')](_0x2a90('0x16'),_0x18a60e,'request\x20sent');_0x361571(_0x541e22[_0x2a90('0x17')][_0x2a90('0x15')]);}})[_0x2a90('0x18')](function(_0x52622c){logger[_0x2a90('0x14')](_0x2a90('0x16'),_0x18a60e,_0x52622c);_0x3dadc2(_0x52622c);});});}
\ No newline at end of file