Built motion from commit a8c4dd89.|2.6.33
[motion2.git] / server / api / migration / migration.rpc.js
index a04cf90..ee41401 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac72=['request','info','Migration,\x20%s,\x20%s','request\x20sent','debug','Migration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xac72,0x1eb));var _0x2ac7=function(_0x4ea5c3,_0x317631){_0x4ea5c3=_0x4ea5c3-0x0;var _0x28dbaf=_0xac72[_0x4ea5c3];return _0x28dbaf;};'use strict';var _=require(_0x2ac7('0x0'));var util=require(_0x2ac7('0x1'));var moment=require(_0x2ac7('0x2'));var BPromise=require('bluebird');var rs=require(_0x2ac7('0x3'));var fs=require('fs');var Redis=require(_0x2ac7('0x4'));var db=require(_0x2ac7('0x5'))['db'];var utils=require(_0x2ac7('0x6'));var logger=require(_0x2ac7('0x7'))(_0x2ac7('0x8'));var config=require(_0x2ac7('0x9'));var jayson=require(_0x2ac7('0xa'));var client=jayson[_0x2ac7('0xb')][_0x2ac7('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4e11a4,_0x19d2f0,_0xf836e2){return new BPromise(function(_0x5055f1,_0x2bcc25){return client[_0x2ac7('0xd')](_0x4e11a4,_0xf836e2)['then'](function(_0x2679e5){logger[_0x2ac7('0xe')](_0x2ac7('0xf'),_0x19d2f0,_0x2ac7('0x10'));logger[_0x2ac7('0x11')](_0x2ac7('0x12'),_0x19d2f0,_0x2ac7('0x10'),JSON['stringify'](_0x2679e5));if(_0x2679e5[_0x2ac7('0x13')]){if(_0x2679e5['error'][_0x2ac7('0x14')]===0x1f4){logger['error'](_0x2ac7('0xf'),_0x19d2f0,_0x2679e5[_0x2ac7('0x13')]['message']);return _0x2bcc25(_0x2679e5['error'][_0x2ac7('0x15')]);}logger[_0x2ac7('0x13')](_0x2ac7('0xf'),_0x19d2f0,_0x2679e5[_0x2ac7('0x13')][_0x2ac7('0x15')]);return _0x5055f1(_0x2679e5['error'][_0x2ac7('0x15')]);}else{logger[_0x2ac7('0xe')]('Migration,\x20%s,\x20%s',_0x19d2f0,'request\x20sent');_0x5055f1(_0x2679e5[_0x2ac7('0x16')][_0x2ac7('0x15')]);}})[_0x2ac7('0x17')](function(_0x10911d){logger['error'](_0x2ac7('0xf'),_0x19d2f0,_0x10911d);_0x2bcc25(_0x10911d);});});}
\ No newline at end of file
+var _0x74f0=['message','result','catch','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','info','Migration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x74f0,0xf3));var _0x074f=function(_0x17b0d4,_0x377add){_0x17b0d4=_0x17b0d4-0x0;var _0x2d02c7=_0x74f0[_0x17b0d4];return _0x2d02c7;};'use strict';var _=require('lodash');var util=require(_0x074f('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x074f('0x1'));var fs=require('fs');var Redis=require(_0x074f('0x2'));var db=require(_0x074f('0x3'))['db'];var utils=require(_0x074f('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x074f('0x5'));var jayson=require(_0x074f('0x6'));var client=jayson[_0x074f('0x7')][_0x074f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x10b244,_0x395b3c,_0x3dd440){return new BPromise(function(_0x547297,_0x7108e1){return client[_0x074f('0x9')](_0x10b244,_0x3dd440)['then'](function(_0x252a2e){logger[_0x074f('0xa')](_0x074f('0xb'),_0x395b3c,_0x074f('0xc'));logger[_0x074f('0xd')]('Migration,\x20%s,\x20%s,\x20%s',_0x395b3c,'request\x20sent',JSON[_0x074f('0xe')](_0x252a2e));if(_0x252a2e[_0x074f('0xf')]){if(_0x252a2e[_0x074f('0xf')][_0x074f('0x10')]===0x1f4){logger[_0x074f('0xf')](_0x074f('0xb'),_0x395b3c,_0x252a2e[_0x074f('0xf')][_0x074f('0x11')]);return _0x7108e1(_0x252a2e[_0x074f('0xf')]['message']);}logger[_0x074f('0xf')]('Migration,\x20%s,\x20%s',_0x395b3c,_0x252a2e[_0x074f('0xf')][_0x074f('0x11')]);return _0x547297(_0x252a2e[_0x074f('0xf')][_0x074f('0x11')]);}else{logger[_0x074f('0xa')](_0x074f('0xb'),_0x395b3c,_0x074f('0xc'));_0x547297(_0x252a2e[_0x074f('0x12')][_0x074f('0x11')]);}})[_0x074f('0x13')](function(_0x40fd10){logger['error'](_0x074f('0xb'),_0x395b3c,_0x40fd10);_0x7108e1(_0x40fd10);});});}
\ No newline at end of file