Built motion from commit 97153652.|2.6.26
[motion2.git] / server / api / migration / migration.rpc.js
index 3e57aca..392cf2f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2b84=['randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','Migration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','bluebird'];(function(_0x3dc68d,_0x1c1951){var _0xdf7f94=function(_0x339428){while(--_0x339428){_0x3dc68d['push'](_0x3dc68d['shift']());}};_0xdf7f94(++_0x1c1951);}(_0x2b84,0x105));var _0x42b8=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x2b84[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0x42b8('0x0'));var util=require('util');var moment=require(_0x42b8('0x1'));var BPromise=require(_0x42b8('0x2'));var rs=require(_0x42b8('0x3'));var fs=require('fs');var Redis=require(_0x42b8('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x42b8('0x5'));var logger=require(_0x42b8('0x6'))(_0x42b8('0x7'));var config=require(_0x42b8('0x8'));var jayson=require(_0x42b8('0x9'));var client=jayson[_0x42b8('0xa')][_0x42b8('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x57e9a,_0x593975,_0x17bf95){return new BPromise(function(_0x57830c,_0x213fec){return client['request'](_0x57e9a,_0x17bf95)['then'](function(_0x3f79f6){logger[_0x42b8('0xc')](_0x42b8('0xd'),_0x593975,_0x42b8('0xe'));logger[_0x42b8('0xf')]('Migration,\x20%s,\x20%s,\x20%s',_0x593975,_0x42b8('0xe'),JSON[_0x42b8('0x10')](_0x3f79f6));if(_0x3f79f6[_0x42b8('0x11')]){if(_0x3f79f6['error'][_0x42b8('0x12')]===0x1f4){logger[_0x42b8('0x11')](_0x42b8('0xd'),_0x593975,_0x3f79f6['error'][_0x42b8('0x13')]);return _0x213fec(_0x3f79f6[_0x42b8('0x11')]['message']);}logger[_0x42b8('0x11')](_0x42b8('0xd'),_0x593975,_0x3f79f6[_0x42b8('0x11')][_0x42b8('0x13')]);return _0x57830c(_0x3f79f6[_0x42b8('0x11')][_0x42b8('0x13')]);}else{logger[_0x42b8('0xc')]('Migration,\x20%s,\x20%s',_0x593975,'request\x20sent');_0x57830c(_0x3f79f6[_0x42b8('0x14')][_0x42b8('0x13')]);}})[_0x42b8('0x15')](function(_0x59be69){logger[_0x42b8('0x11')](_0x42b8('0xd'),_0x593975,_0x59be69);_0x213fec(_0x59be69);});});}
\ No newline at end of file
+var _0x8ce3=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','Migration,\x20%s,\x20%s','request\x20sent','debug','Migration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','bluebird'];(function(_0x3d30a9,_0x4da997){var _0x3efb9a=function(_0x5b7579){while(--_0x5b7579){_0x3d30a9['push'](_0x3d30a9['shift']());}};_0x3efb9a(++_0x4da997);}(_0x8ce3,0xc3));var _0x38ce=function(_0x4e291f,_0x202c9){_0x4e291f=_0x4e291f-0x0;var _0x3b2d52=_0x8ce3[_0x4e291f];return _0x3b2d52;};'use strict';var _=require(_0x38ce('0x0'));var util=require(_0x38ce('0x1'));var moment=require('moment');var BPromise=require(_0x38ce('0x2'));var rs=require(_0x38ce('0x3'));var fs=require('fs');var Redis=require(_0x38ce('0x4'));var db=require(_0x38ce('0x5'))['db'];var utils=require(_0x38ce('0x6'));var logger=require(_0x38ce('0x7'))(_0x38ce('0x8'));var config=require(_0x38ce('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x38ce('0xa')][_0x38ce('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x58074c,_0x262b13,_0xbe7332){return new BPromise(function(_0x3f8011,_0x482955){return client[_0x38ce('0xc')](_0x58074c,_0xbe7332)['then'](function(_0x725d27){logger['info'](_0x38ce('0xd'),_0x262b13,_0x38ce('0xe'));logger[_0x38ce('0xf')](_0x38ce('0x10'),_0x262b13,_0x38ce('0xe'),JSON[_0x38ce('0x11')](_0x725d27));if(_0x725d27[_0x38ce('0x12')]){if(_0x725d27[_0x38ce('0x12')][_0x38ce('0x13')]===0x1f4){logger[_0x38ce('0x12')](_0x38ce('0xd'),_0x262b13,_0x725d27[_0x38ce('0x12')][_0x38ce('0x14')]);return _0x482955(_0x725d27[_0x38ce('0x12')][_0x38ce('0x14')]);}logger[_0x38ce('0x12')]('Migration,\x20%s,\x20%s',_0x262b13,_0x725d27['error'][_0x38ce('0x14')]);return _0x3f8011(_0x725d27[_0x38ce('0x12')][_0x38ce('0x14')]);}else{logger['info'](_0x38ce('0xd'),_0x262b13,'request\x20sent');_0x3f8011(_0x725d27[_0x38ce('0x15')][_0x38ce('0x14')]);}})['catch'](function(_0x5fc115){logger[_0x38ce('0x12')](_0x38ce('0xd'),_0x262b13,_0x5fc115);_0x482955(_0x5fc115);});});}
\ No newline at end of file