Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / squareRecording / squareRecording.rpc.js
index 842513b..13d2833 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1ac3=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','SquareRecording,\x20%s,\x20%s','request\x20sent','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','CreateSquareRecording','SquareRecording','create','body','options','raw','lodash','util','moment','bluebird','randomstring'];(function(_0xc0a3d3,_0x2c8d00){var _0x3386e8=function(_0x3f9df4){while(--_0x3f9df4){_0xc0a3d3['push'](_0xc0a3d3['shift']());}};_0x3386e8(++_0x2c8d00);}(_0x1ac3,0x1db));var _0x31ac=function(_0x565c49,_0x54acd0){_0x565c49=_0x565c49-0x0;var _0x20ca34=_0x1ac3[_0x565c49];return _0x20ca34;};'use strict';var _=require(_0x31ac('0x0'));var util=require(_0x31ac('0x1'));var moment=require(_0x31ac('0x2'));var BPromise=require(_0x31ac('0x3'));var rs=require(_0x31ac('0x4'));var fs=require('fs');var Redis=require(_0x31ac('0x5'));var db=require(_0x31ac('0x6'))['db'];var utils=require(_0x31ac('0x7'));var logger=require(_0x31ac('0x8'))(_0x31ac('0x9'));var config=require(_0x31ac('0xa'));var jayson=require(_0x31ac('0xb'));var client=jayson[_0x31ac('0xc')][_0x31ac('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x15024d,_0x4201d6,_0x43fa1c){return new BPromise(function(_0x4eff5e,_0x29458b){return client[_0x31ac('0xe')](_0x15024d,_0x43fa1c)[_0x31ac('0xf')](function(_0x170c31){logger['info'](_0x31ac('0x10'),_0x4201d6,_0x31ac('0x11'));logger['debug'](_0x31ac('0x12'),_0x4201d6,_0x31ac('0x11'),JSON[_0x31ac('0x13')](_0x170c31));if(_0x170c31[_0x31ac('0x14')]){if(_0x170c31[_0x31ac('0x14')][_0x31ac('0x15')]===0x1f4){logger['error'](_0x31ac('0x10'),_0x4201d6,_0x170c31[_0x31ac('0x14')]['message']);return _0x29458b(_0x170c31[_0x31ac('0x14')][_0x31ac('0x16')]);}logger[_0x31ac('0x14')]('SquareRecording,\x20%s,\x20%s',_0x4201d6,_0x170c31[_0x31ac('0x14')][_0x31ac('0x16')]);return _0x4eff5e(_0x170c31[_0x31ac('0x14')]['message']);}else{logger[_0x31ac('0x17')](_0x31ac('0x10'),_0x4201d6,_0x31ac('0x11'));_0x4eff5e(_0x170c31[_0x31ac('0x18')][_0x31ac('0x16')]);}})[_0x31ac('0x19')](function(_0x49782d){logger[_0x31ac('0x14')](_0x31ac('0x10'),_0x4201d6,_0x49782d);_0x29458b(_0x49782d);});});}exports[_0x31ac('0x1a')]=function(_0x1b7093){var _0x160b1b=this;return new Promise(function(_0xeab2e8,_0x5bab06){return db[_0x31ac('0x1b')][_0x31ac('0x1c')](_0x1b7093[_0x31ac('0x1d')],{'raw':_0x1b7093[_0x31ac('0x1e')]?_0x1b7093['options'][_0x31ac('0x1f')]===undefined?!![]:![]:!![]})[_0x31ac('0xf')](function(_0x19b91f){logger['info'](_0x31ac('0x1a'),_0x1b7093);logger['debug'](_0x31ac('0x1a'),_0x1b7093,JSON['stringify'](_0x19b91f));_0xeab2e8(_0x19b91f);})['catch'](function(_0xd6184e){logger[_0x31ac('0x14')](_0x31ac('0x1a'),_0xd6184e[_0x31ac('0x16')],_0x1b7093);_0x5bab06(_0x160b1b[_0x31ac('0x14')](0x1f4,_0xd6184e[_0x31ac('0x16')]));});});};
\ No newline at end of file
+var _0xf378=['info','SquareRecording,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','CreateSquareRecording','SquareRecording','create','body','options','raw','debug','stringify','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x8beeeb,_0x373d75){var _0x568897=function(_0x4f68f8){while(--_0x4f68f8){_0x8beeeb['push'](_0x8beeeb['shift']());}};_0x568897(++_0x373d75);}(_0xf378,0xd4));var _0x8f37=function(_0x465a0c,_0x19d4d5){_0x465a0c=_0x465a0c-0x0;var _0x1e202e=_0xf378[_0x465a0c];return _0x1e202e;};'use strict';var _=require('lodash');var util=require(_0x8f37('0x0'));var moment=require(_0x8f37('0x1'));var BPromise=require(_0x8f37('0x2'));var rs=require(_0x8f37('0x3'));var fs=require('fs');var Redis=require(_0x8f37('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x8f37('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x8f37('0x6'));var jayson=require(_0x8f37('0x7'));var client=jayson[_0x8f37('0x8')][_0x8f37('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3118f7,_0x2e11ec,_0x585c73){return new BPromise(function(_0x276766,_0x58a953){return client[_0x8f37('0xa')](_0x3118f7,_0x585c73)[_0x8f37('0xb')](function(_0x3a28f2){logger[_0x8f37('0xc')](_0x8f37('0xd'),_0x2e11ec,_0x8f37('0xe'));logger['debug']('SquareRecording,\x20%s,\x20%s,\x20%s',_0x2e11ec,_0x8f37('0xe'),JSON['stringify'](_0x3a28f2));if(_0x3a28f2['error']){if(_0x3a28f2[_0x8f37('0xf')][_0x8f37('0x10')]===0x1f4){logger[_0x8f37('0xf')]('SquareRecording,\x20%s,\x20%s',_0x2e11ec,_0x3a28f2['error'][_0x8f37('0x11')]);return _0x58a953(_0x3a28f2[_0x8f37('0xf')][_0x8f37('0x11')]);}logger['error']('SquareRecording,\x20%s,\x20%s',_0x2e11ec,_0x3a28f2[_0x8f37('0xf')]['message']);return _0x276766(_0x3a28f2[_0x8f37('0xf')]['message']);}else{logger[_0x8f37('0xc')]('SquareRecording,\x20%s,\x20%s',_0x2e11ec,'request\x20sent');_0x276766(_0x3a28f2[_0x8f37('0x12')][_0x8f37('0x11')]);}})[_0x8f37('0x13')](function(_0x3cff7c){logger[_0x8f37('0xf')](_0x8f37('0xd'),_0x2e11ec,_0x3cff7c);_0x58a953(_0x3cff7c);});});}exports[_0x8f37('0x14')]=function(_0x2eccaf){var _0x351c2b=this;return new Promise(function(_0x5d7536,_0x20c1e2){return db[_0x8f37('0x15')][_0x8f37('0x16')](_0x2eccaf[_0x8f37('0x17')],{'raw':_0x2eccaf['options']?_0x2eccaf[_0x8f37('0x18')][_0x8f37('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x8062){logger[_0x8f37('0xc')]('CreateSquareRecording',_0x2eccaf);logger[_0x8f37('0x1a')](_0x8f37('0x14'),_0x2eccaf,JSON[_0x8f37('0x1b')](_0x8062));_0x5d7536(_0x8062);})['catch'](function(_0x25d315){logger['error'](_0x8f37('0x14'),_0x25d315[_0x8f37('0x11')],_0x2eccaf);_0x20c1e2(_0x351c2b['error'](0x1f4,_0x25d315[_0x8f37('0x11')]));});});};
\ No newline at end of file