Built motion from commit 497d3d92.|2.5.43
[motion2.git] / server / api / dashboardItem / dashboardItem.rpc.js
index ec9e154..e8732d9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x53f0=['../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','./dashboardItem.socket','request','then','DashboardItem,\x20%s,\x20%s','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x173db6,_0x27e5cc){var _0x28fb13=function(_0x2e7ede){while(--_0x2e7ede){_0x173db6['push'](_0x173db6['shift']());}};_0x28fb13(++_0x27e5cc);}(_0x53f0,0x9b));var _0x053f=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x53f0[_0x4b055c];return _0x4b62bb;};'use strict';var _=require('lodash');var util=require(_0x053f('0x0'));var moment=require(_0x053f('0x1'));var BPromise=require(_0x053f('0x2'));var rs=require(_0x053f('0x3'));var fs=require('fs');var Redis=require(_0x053f('0x4'));var db=require(_0x053f('0x5'))['db'];var utils=require(_0x053f('0x6'));var logger=require(_0x053f('0x7'))(_0x053f('0x8'));var config=require(_0x053f('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x053f('0xa')][_0x053f('0xb')]({'port':0x232a});config[_0x053f('0xc')]=_[_0x053f('0xd')](config[_0x053f('0xc')],{'host':_0x053f('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x053f('0xc')]));require(_0x053f('0xf'))['register'](socket);function respondWithRpcPromise(_0xb48e26,_0x50b061,_0x2f3ae5){return new BPromise(function(_0x539eb9,_0x13c32c){return client[_0x053f('0x10')](_0xb48e26,_0x2f3ae5)[_0x053f('0x11')](function(_0x25ebd5){logger['info'](_0x053f('0x12'),_0x50b061,'request\x20sent');logger['debug'](_0x053f('0x13'),_0x50b061,'request\x20sent',JSON[_0x053f('0x14')](_0x25ebd5));if(_0x25ebd5[_0x053f('0x15')]){if(_0x25ebd5[_0x053f('0x15')][_0x053f('0x16')]===0x1f4){logger[_0x053f('0x15')](_0x053f('0x12'),_0x50b061,_0x25ebd5[_0x053f('0x15')][_0x053f('0x17')]);return _0x13c32c(_0x25ebd5[_0x053f('0x15')][_0x053f('0x17')]);}logger['error'](_0x053f('0x12'),_0x50b061,_0x25ebd5[_0x053f('0x15')][_0x053f('0x17')]);return _0x539eb9(_0x25ebd5['error'][_0x053f('0x17')]);}else{logger[_0x053f('0x18')](_0x053f('0x12'),_0x50b061,'request\x20sent');_0x539eb9(_0x25ebd5[_0x053f('0x19')][_0x053f('0x17')]);}})[_0x053f('0x1a')](function(_0x4aa3c3){logger['error'](_0x053f('0x12'),_0x50b061,_0x4aa3c3);_0x13c32c(_0x4aa3c3);});});}
\ No newline at end of file
+var _0x595a=['http','redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','then','info','DashboardItem,\x20%s,\x20%s','debug','DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client'];(function(_0x42ad52,_0x5240c5){var _0x451d89=function(_0x5ec225){while(--_0x5ec225){_0x42ad52['push'](_0x42ad52['shift']());}};_0x451d89(++_0x5240c5);}(_0x595a,0x164));var _0xa595=function(_0x454bd3,_0x3e4d94){_0x454bd3=_0x454bd3-0x0;var _0x4eb066=_0x595a[_0x454bd3];return _0x4eb066;};'use strict';var _=require(_0xa595('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xa595('0x1'));var fs=require('fs');var Redis=require(_0xa595('0x2'));var db=require(_0xa595('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xa595('0x4'))(_0xa595('0x5'));var config=require(_0xa595('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xa595('0x7')][_0xa595('0x8')]({'port':0x232a});config[_0xa595('0x9')]=_[_0xa595('0xa')](config[_0xa595('0x9')],{'host':_0xa595('0xb'),'port':0x18eb});var socket=require(_0xa595('0xc'))(new Redis(config[_0xa595('0x9')]));require(_0xa595('0xd'))['register'](socket);function respondWithRpcPromise(_0x4216b4,_0xfa9d75,_0x4309a8){return new BPromise(function(_0x4475c6,_0x25cf6e){return client['request'](_0x4216b4,_0x4309a8)[_0xa595('0xe')](function(_0x4ef0d8){logger[_0xa595('0xf')](_0xa595('0x10'),_0xfa9d75,'request\x20sent');logger[_0xa595('0x11')](_0xa595('0x12'),_0xfa9d75,_0xa595('0x13'),JSON[_0xa595('0x14')](_0x4ef0d8));if(_0x4ef0d8[_0xa595('0x15')]){if(_0x4ef0d8[_0xa595('0x15')][_0xa595('0x16')]===0x1f4){logger[_0xa595('0x15')](_0xa595('0x10'),_0xfa9d75,_0x4ef0d8[_0xa595('0x15')][_0xa595('0x17')]);return _0x25cf6e(_0x4ef0d8[_0xa595('0x15')][_0xa595('0x17')]);}logger[_0xa595('0x15')]('DashboardItem,\x20%s,\x20%s',_0xfa9d75,_0x4ef0d8[_0xa595('0x15')]['message']);return _0x4475c6(_0x4ef0d8[_0xa595('0x15')][_0xa595('0x17')]);}else{logger[_0xa595('0xf')]('DashboardItem,\x20%s,\x20%s',_0xfa9d75,_0xa595('0x13'));_0x4475c6(_0x4ef0d8[_0xa595('0x18')][_0xa595('0x17')]);}})[_0xa595('0x19')](function(_0x5e4d12){logger[_0xa595('0x15')](_0xa595('0x10'),_0xfa9d75,_0x5e4d12);_0x25cf6e(_0x5e4d12);});});}
\ No newline at end of file