Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / squareRecording / squareRecording.rpc.js
index 6d3acd6..c915d65 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x62f2=['SquareRecording,\x20%s,\x20%s','request\x20sent','debug','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateSquareRecording','SquareRecording','create','body','options','catch','lodash','util','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info'];(function(_0x5d17d3,_0x5b664e){var _0x3456df=function(_0x337eaf){while(--_0x337eaf){_0x5d17d3['push'](_0x5d17d3['shift']());}};_0x3456df(++_0x5b664e);}(_0x62f2,0xcc));var _0x262f=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x62f2[_0x13d07a];return _0x5ee0ee;};'use strict';var _=require(_0x262f('0x0'));var util=require(_0x262f('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x262f('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x262f('0x3'))['db'];var utils=require(_0x262f('0x4'));var logger=require(_0x262f('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x262f('0x6'));var client=jayson[_0x262f('0x7')][_0x262f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x76d0a5,_0x5805a8,_0x1260f2){return new BPromise(function(_0x14ee0c,_0x57375c){return client[_0x262f('0x9')](_0x76d0a5,_0x1260f2)[_0x262f('0xa')](function(_0x3b416c){logger[_0x262f('0xb')](_0x262f('0xc'),_0x5805a8,_0x262f('0xd'));logger[_0x262f('0xe')](_0x262f('0xf'),_0x5805a8,'request\x20sent',JSON[_0x262f('0x10')](_0x3b416c));if(_0x3b416c[_0x262f('0x11')]){if(_0x3b416c[_0x262f('0x11')][_0x262f('0x12')]===0x1f4){logger[_0x262f('0x11')]('SquareRecording,\x20%s,\x20%s',_0x5805a8,_0x3b416c[_0x262f('0x11')][_0x262f('0x13')]);return _0x57375c(_0x3b416c['error'][_0x262f('0x13')]);}logger['error'](_0x262f('0xc'),_0x5805a8,_0x3b416c[_0x262f('0x11')][_0x262f('0x13')]);return _0x14ee0c(_0x3b416c['error'][_0x262f('0x13')]);}else{logger['info'](_0x262f('0xc'),_0x5805a8,_0x262f('0xd'));_0x14ee0c(_0x3b416c[_0x262f('0x14')][_0x262f('0x13')]);}})['catch'](function(_0x91ac39){logger[_0x262f('0x11')](_0x262f('0xc'),_0x5805a8,_0x91ac39);_0x57375c(_0x91ac39);});});}exports[_0x262f('0x15')]=function(_0x6cc2bf){var _0x494713=this;return new Promise(function(_0xa645f1,_0x4476e9){return db[_0x262f('0x16')][_0x262f('0x17')](_0x6cc2bf[_0x262f('0x18')],{'raw':_0x6cc2bf[_0x262f('0x19')]?_0x6cc2bf['options']['raw']===undefined?!![]:![]:!![]})[_0x262f('0xa')](function(_0x214131){logger[_0x262f('0xb')](_0x262f('0x15'),_0x6cc2bf);logger['debug'](_0x262f('0x15'),_0x6cc2bf,JSON[_0x262f('0x10')](_0x214131));_0xa645f1(_0x214131);})[_0x262f('0x1a')](function(_0x1e11ac){logger[_0x262f('0x11')](_0x262f('0x15'),_0x1e11ac[_0x262f('0x13')],_0x6cc2bf);_0x4476e9(_0x494713[_0x262f('0x11')](0x1f4,_0x1e11ac[_0x262f('0x13')]));});});};
\ No newline at end of file
+var _0x3408=['SquareRecording,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','CreateSquareRecording','SquareRecording','create','body','options','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','then','info','SquareRecording,\x20%s,\x20%s','debug'];(function(_0x324df7,_0x5053af){var _0x2584cf=function(_0x2a5075){while(--_0x2a5075){_0x324df7['push'](_0x324df7['shift']());}};_0x2584cf(++_0x5053af);}(_0x3408,0x11a));var _0x8340=function(_0x10cd49,_0x3affdc){_0x10cd49=_0x10cd49-0x0;var _0x5594d7=_0x3408[_0x10cd49];return _0x5594d7;};'use strict';var _=require('lodash');var util=require(_0x8340('0x0'));var moment=require(_0x8340('0x1'));var BPromise=require(_0x8340('0x2'));var rs=require(_0x8340('0x3'));var fs=require('fs');var Redis=require(_0x8340('0x4'));var db=require(_0x8340('0x5'))['db'];var utils=require(_0x8340('0x6'));var logger=require(_0x8340('0x7'))('rpc');var config=require(_0x8340('0x8'));var jayson=require(_0x8340('0x9'));var client=jayson[_0x8340('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x370cd8,_0x4007a0,_0x5ea79a){return new BPromise(function(_0x45e172,_0x52a7c4){return client['request'](_0x370cd8,_0x5ea79a)[_0x8340('0xb')](function(_0x53062e){logger[_0x8340('0xc')](_0x8340('0xd'),_0x4007a0,'request\x20sent');logger[_0x8340('0xe')](_0x8340('0xf'),_0x4007a0,_0x8340('0x10'),JSON[_0x8340('0x11')](_0x53062e));if(_0x53062e['error']){if(_0x53062e[_0x8340('0x12')][_0x8340('0x13')]===0x1f4){logger[_0x8340('0x12')]('SquareRecording,\x20%s,\x20%s',_0x4007a0,_0x53062e[_0x8340('0x12')][_0x8340('0x14')]);return _0x52a7c4(_0x53062e['error'][_0x8340('0x14')]);}logger[_0x8340('0x12')](_0x8340('0xd'),_0x4007a0,_0x53062e[_0x8340('0x12')]['message']);return _0x45e172(_0x53062e['error'][_0x8340('0x14')]);}else{logger['info'](_0x8340('0xd'),_0x4007a0,_0x8340('0x10'));_0x45e172(_0x53062e['result'][_0x8340('0x14')]);}})[_0x8340('0x15')](function(_0x5338b5){logger[_0x8340('0x12')](_0x8340('0xd'),_0x4007a0,_0x5338b5);_0x52a7c4(_0x5338b5);});});}exports[_0x8340('0x16')]=function(_0x1e6253){var _0x48db65=this;return new Promise(function(_0x3acd91,_0x1a1d79){return db[_0x8340('0x17')][_0x8340('0x18')](_0x1e6253[_0x8340('0x19')],{'raw':_0x1e6253['options']?_0x1e6253[_0x8340('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0x8340('0xb')](function(_0x5bceee){logger[_0x8340('0xc')](_0x8340('0x16'),_0x1e6253);logger[_0x8340('0xe')](_0x8340('0x16'),_0x1e6253,JSON['stringify'](_0x5bceee));_0x3acd91(_0x5bceee);})[_0x8340('0x15')](function(_0x557e56){logger['error'](_0x8340('0x16'),_0x557e56[_0x8340('0x14')],_0x1e6253);_0x1a1d79(_0x48db65[_0x8340('0x12')](0x1f4,_0x557e56[_0x8340('0x14')]));});});};
\ No newline at end of file