Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / migration / migration.rpc.js
index 08dceef..cc24656 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4c9=['Migration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','request','then','Migration,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x24f31b,_0x44b8f3){var _0x488401=function(_0x204caf){while(--_0x204caf){_0x24f31b['push'](_0x24f31b['shift']());}};_0x488401(++_0x44b8f3);}(_0xf4c9,0x1aa));var _0x9f4c=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0xf4c9[_0x2c7618];return _0x5ce3f0;};'use strict';var _=require(_0x9f4c('0x0'));var util=require(_0x9f4c('0x1'));var moment=require(_0x9f4c('0x2'));var BPromise=require('bluebird');var rs=require(_0x9f4c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9f4c('0x4'))['db'];var utils=require(_0x9f4c('0x5'));var logger=require(_0x9f4c('0x6'))('rpc');var config=require(_0x9f4c('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x9f4c('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5cf322,_0x498795,_0x12aeb7){return new BPromise(function(_0x398b30,_0x72c8ea){return client[_0x9f4c('0x9')](_0x5cf322,_0x12aeb7)[_0x9f4c('0xa')](function(_0x37b693){logger['info'](_0x9f4c('0xb'),_0x498795,_0x9f4c('0xc'));logger[_0x9f4c('0xd')](_0x9f4c('0xe'),_0x498795,_0x9f4c('0xc'),JSON[_0x9f4c('0xf')](_0x37b693));if(_0x37b693[_0x9f4c('0x10')]){if(_0x37b693[_0x9f4c('0x10')]['code']===0x1f4){logger['error']('Migration,\x20%s,\x20%s',_0x498795,_0x37b693[_0x9f4c('0x10')]['message']);return _0x72c8ea(_0x37b693['error'][_0x9f4c('0x11')]);}logger['error']('Migration,\x20%s,\x20%s',_0x498795,_0x37b693[_0x9f4c('0x10')]['message']);return _0x398b30(_0x37b693['error'][_0x9f4c('0x11')]);}else{logger['info'](_0x9f4c('0xb'),_0x498795,_0x9f4c('0xc'));_0x398b30(_0x37b693[_0x9f4c('0x12')][_0x9f4c('0x11')]);}})[_0x9f4c('0x13')](function(_0xb61bdf){logger['error'](_0x9f4c('0xb'),_0x498795,_0xb61bdf);_0x72c8ea(_0xb61bdf);});});}
\ No newline at end of file
+var _0x21a8=['message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','Migration,\x20%s,\x20%s','request\x20sent','debug','Migration,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x21a8,0xed));var _0x821a=function(_0x1ede51,_0x30c587){_0x1ede51=_0x1ede51-0x0;var _0xc71804=_0x21a8[_0x1ede51];return _0xc71804;};'use strict';var _=require(_0x821a('0x0'));var util=require(_0x821a('0x1'));var moment=require(_0x821a('0x2'));var BPromise=require(_0x821a('0x3'));var rs=require(_0x821a('0x4'));var fs=require('fs');var Redis=require(_0x821a('0x5'));var db=require(_0x821a('0x6'))['db'];var utils=require(_0x821a('0x7'));var logger=require(_0x821a('0x8'))('rpc');var config=require(_0x821a('0x9'));var jayson=require(_0x821a('0xa'));var client=jayson[_0x821a('0xb')][_0x821a('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xcae829,_0x1de26f,_0x3d76a9){return new BPromise(function(_0x1e54aa,_0x5dd47a){return client[_0x821a('0xd')](_0xcae829,_0x3d76a9)[_0x821a('0xe')](function(_0x32a236){logger[_0x821a('0xf')](_0x821a('0x10'),_0x1de26f,_0x821a('0x11'));logger[_0x821a('0x12')](_0x821a('0x13'),_0x1de26f,_0x821a('0x11'),JSON[_0x821a('0x14')](_0x32a236));if(_0x32a236[_0x821a('0x15')]){if(_0x32a236['error'][_0x821a('0x16')]===0x1f4){logger[_0x821a('0x15')](_0x821a('0x10'),_0x1de26f,_0x32a236[_0x821a('0x15')][_0x821a('0x17')]);return _0x5dd47a(_0x32a236[_0x821a('0x15')]['message']);}logger[_0x821a('0x15')](_0x821a('0x10'),_0x1de26f,_0x32a236[_0x821a('0x15')][_0x821a('0x17')]);return _0x1e54aa(_0x32a236['error']['message']);}else{logger[_0x821a('0xf')]('Migration,\x20%s,\x20%s',_0x1de26f,_0x821a('0x11'));_0x1e54aa(_0x32a236[_0x821a('0x18')][_0x821a('0x17')]);}})[_0x821a('0x19')](function(_0x1177e6){logger[_0x821a('0x15')]('Migration,\x20%s,\x20%s',_0x1de26f,_0x1177e6);_0x5dd47a(_0x1177e6);});});}
\ No newline at end of file