Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / cmHopperFinal / cmHopperFinal.rpc.js
index 0a8dff8..9ca1006 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9fa4=['request','then','CmHopperFinal,\x20%s,\x20%s','request\x20sent','debug','CmHopperFinal,\x20%s,\x20%s,\x20%s','error','code','message','info','CreateCmHopperFinal','CmHopperFinal','create','body','options','raw','stringify','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x1aab9d,_0x503b9e){var _0x3840b2=function(_0x338c19){while(--_0x338c19){_0x1aab9d['push'](_0x1aab9d['shift']());}};_0x3840b2(++_0x503b9e);}(_0x9fa4,0x69));var _0x49fa=function(_0x460d4f,_0x269b8e){_0x460d4f=_0x460d4f-0x0;var _0x3a6dd4=_0x9fa4[_0x460d4f];return _0x3a6dd4;};'use strict';var _=require(_0x49fa('0x0'));var util=require(_0x49fa('0x1'));var moment=require('moment');var BPromise=require(_0x49fa('0x2'));var rs=require(_0x49fa('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x49fa('0x4'))['db'];var utils=require(_0x49fa('0x5'));var logger=require(_0x49fa('0x6'))(_0x49fa('0x7'));var config=require(_0x49fa('0x8'));var jayson=require(_0x49fa('0x9'));var client=jayson['client'][_0x49fa('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1b19ea,_0x214c35,_0x4eab03){return new BPromise(function(_0x379da8,_0x44f5b9){return client[_0x49fa('0xb')](_0x1b19ea,_0x4eab03)[_0x49fa('0xc')](function(_0x379418){logger['info'](_0x49fa('0xd'),_0x214c35,_0x49fa('0xe'));logger[_0x49fa('0xf')](_0x49fa('0x10'),_0x214c35,'request\x20sent',JSON['stringify'](_0x379418));if(_0x379418[_0x49fa('0x11')]){if(_0x379418[_0x49fa('0x11')][_0x49fa('0x12')]===0x1f4){logger[_0x49fa('0x11')](_0x49fa('0xd'),_0x214c35,_0x379418['error']['message']);return _0x44f5b9(_0x379418[_0x49fa('0x11')][_0x49fa('0x13')]);}logger['error'](_0x49fa('0xd'),_0x214c35,_0x379418[_0x49fa('0x11')]['message']);return _0x379da8(_0x379418[_0x49fa('0x11')][_0x49fa('0x13')]);}else{logger[_0x49fa('0x14')](_0x49fa('0xd'),_0x214c35,_0x49fa('0xe'));_0x379da8(_0x379418['result'][_0x49fa('0x13')]);}})['catch'](function(_0x1ca1e0){logger['error'](_0x49fa('0xd'),_0x214c35,_0x1ca1e0);_0x44f5b9(_0x1ca1e0);});});}exports[_0x49fa('0x15')]=function(_0x1cb364){var _0x60732c=this;return new Promise(function(_0x3e644c,_0x425c22){return db[_0x49fa('0x16')][_0x49fa('0x17')](_0x1cb364[_0x49fa('0x18')],{'raw':_0x1cb364[_0x49fa('0x19')]?_0x1cb364[_0x49fa('0x19')][_0x49fa('0x1a')]===undefined?!![]:![]:!![]})[_0x49fa('0xc')](function(_0x158467){logger[_0x49fa('0x14')]('CreateCmHopperFinal',_0x1cb364);logger[_0x49fa('0xf')](_0x49fa('0x15'),_0x1cb364,JSON[_0x49fa('0x1b')](_0x158467));_0x3e644c(_0x158467);})[_0x49fa('0x1c')](function(_0x58c3b4){logger[_0x49fa('0x11')](_0x49fa('0x15'),_0x58c3b4[_0x49fa('0x13')],_0x1cb364);_0x425c22(_0x60732c[_0x49fa('0x11')](0x1f4,_0x58c3b4[_0x49fa('0x13')]));});});};
\ No newline at end of file
+var _0xc1ce=['rpc','client','request','info','request\x20sent','debug','stringify','error','CmHopperFinal,\x20%s,\x20%s','message','result','catch','CreateCmHopperFinal','options','raw','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0xae7c2f,_0xf31e04){var _0x5d7001=function(_0x4eeadb){while(--_0x4eeadb){_0xae7c2f['push'](_0xae7c2f['shift']());}};_0x5d7001(++_0xf31e04);}(_0xc1ce,0x159));var _0xec1c=function(_0x29fb82,_0xcde885){_0x29fb82=_0x29fb82-0x0;var _0x13c3b6=_0xc1ce[_0x29fb82];return _0x13c3b6;};'use strict';var _=require(_0xec1c('0x0'));var util=require('util');var moment=require(_0xec1c('0x1'));var BPromise=require(_0xec1c('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xec1c('0x3'));var db=require(_0xec1c('0x4'))['db'];var utils=require(_0xec1c('0x5'));var logger=require(_0xec1c('0x6'))(_0xec1c('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xec1c('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x287e95,_0x4211d7,_0x59150a){return new BPromise(function(_0x36775e,_0x179eed){return client[_0xec1c('0x9')](_0x287e95,_0x59150a)['then'](function(_0x11b901){logger[_0xec1c('0xa')]('CmHopperFinal,\x20%s,\x20%s',_0x4211d7,_0xec1c('0xb'));logger[_0xec1c('0xc')]('CmHopperFinal,\x20%s,\x20%s,\x20%s',_0x4211d7,_0xec1c('0xb'),JSON[_0xec1c('0xd')](_0x11b901));if(_0x11b901[_0xec1c('0xe')]){if(_0x11b901[_0xec1c('0xe')]['code']===0x1f4){logger[_0xec1c('0xe')](_0xec1c('0xf'),_0x4211d7,_0x11b901['error'][_0xec1c('0x10')]);return _0x179eed(_0x11b901[_0xec1c('0xe')][_0xec1c('0x10')]);}logger[_0xec1c('0xe')]('CmHopperFinal,\x20%s,\x20%s',_0x4211d7,_0x11b901[_0xec1c('0xe')][_0xec1c('0x10')]);return _0x36775e(_0x11b901[_0xec1c('0xe')][_0xec1c('0x10')]);}else{logger['info'](_0xec1c('0xf'),_0x4211d7,'request\x20sent');_0x36775e(_0x11b901[_0xec1c('0x11')][_0xec1c('0x10')]);}})[_0xec1c('0x12')](function(_0x675b4){logger[_0xec1c('0xe')](_0xec1c('0xf'),_0x4211d7,_0x675b4);_0x179eed(_0x675b4);});});}exports[_0xec1c('0x13')]=function(_0x48b907){var _0x1fc067=this;return new Promise(function(_0x19a84e,_0x5e9828){return db['CmHopperFinal']['create'](_0x48b907['body'],{'raw':_0x48b907[_0xec1c('0x14')]?_0x48b907[_0xec1c('0x14')][_0xec1c('0x15')]===undefined?!![]:![]:!![]})['then'](function(_0x3d7914){logger[_0xec1c('0xa')]('CreateCmHopperFinal',_0x48b907);logger['debug'](_0xec1c('0x13'),_0x48b907,JSON[_0xec1c('0xd')](_0x3d7914));_0x19a84e(_0x3d7914);})[_0xec1c('0x12')](function(_0x240556){logger[_0xec1c('0xe')](_0xec1c('0x13'),_0x240556[_0xec1c('0x10')],_0x48b907);_0x5e9828(_0x1fc067[_0xec1c('0xe')](0x1f4,_0x240556[_0xec1c('0x10')]));});});};
\ No newline at end of file