Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / chatQueueReport / chatQueueReport.rpc.js
index 5811e50..0313cec 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0a17=['rpc','client','http','request','ChatQueueReport,\x20%s,\x20%s','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','CreateChatQueueReport','ChatQueueReport','create','body','options','then','info','UpdateChatQueueReport','update','raw','where','attributes','limit','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x59a8e6,_0x3e38ae){var _0xb59477=function(_0x72cd70){while(--_0x72cd70){_0x59a8e6['push'](_0x59a8e6['shift']());}};_0xb59477(++_0x3e38ae);}(_0x0a17,0x156));var _0x70a1=function(_0x28ac3f,_0x31c929){_0x28ac3f=_0x28ac3f-0x0;var _0x2fdb62=_0x0a17[_0x28ac3f];return _0x2fdb62;};'use strict';var _=require(_0x70a1('0x0'));var util=require('util');var moment=require(_0x70a1('0x1'));var BPromise=require(_0x70a1('0x2'));var rs=require(_0x70a1('0x3'));var fs=require('fs');var Redis=require(_0x70a1('0x4'));var db=require(_0x70a1('0x5'))['db'];var utils=require(_0x70a1('0x6'));var logger=require(_0x70a1('0x7'))(_0x70a1('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x70a1('0x9')][_0x70a1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4cd8b0,_0x57a911,_0x44b55c){return new BPromise(function(_0x1affd0,_0x2a6e10){return client[_0x70a1('0xb')](_0x4cd8b0,_0x44b55c)['then'](function(_0x502bcc){logger['info'](_0x70a1('0xc'),_0x57a911,'request\x20sent');logger[_0x70a1('0xd')](_0x70a1('0xe'),_0x57a911,_0x70a1('0xf'),JSON[_0x70a1('0x10')](_0x502bcc));if(_0x502bcc[_0x70a1('0x11')]){if(_0x502bcc[_0x70a1('0x11')][_0x70a1('0x12')]===0x1f4){logger['error'](_0x70a1('0xc'),_0x57a911,_0x502bcc[_0x70a1('0x11')][_0x70a1('0x13')]);return _0x2a6e10(_0x502bcc['error'][_0x70a1('0x13')]);}logger[_0x70a1('0x11')]('ChatQueueReport,\x20%s,\x20%s',_0x57a911,_0x502bcc[_0x70a1('0x11')][_0x70a1('0x13')]);return _0x1affd0(_0x502bcc[_0x70a1('0x11')]['message']);}else{logger['info'](_0x70a1('0xc'),_0x57a911,'request\x20sent');_0x1affd0(_0x502bcc[_0x70a1('0x14')][_0x70a1('0x13')]);}})[_0x70a1('0x15')](function(_0x19935e){logger[_0x70a1('0x11')](_0x70a1('0xc'),_0x57a911,_0x19935e);_0x2a6e10(_0x19935e);});});}exports[_0x70a1('0x16')]=function(_0x190b60){var _0x55f78d=this;return new Promise(function(_0x672581,_0x5d5dde){return db[_0x70a1('0x17')][_0x70a1('0x18')](_0x190b60[_0x70a1('0x19')],{'raw':_0x190b60[_0x70a1('0x1a')]?_0x190b60[_0x70a1('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0x70a1('0x1b')](function(_0x24ef5e){logger[_0x70a1('0x1c')]('CreateChatQueueReport',_0x190b60);logger[_0x70a1('0xd')]('CreateChatQueueReport',_0x190b60,JSON[_0x70a1('0x10')](_0x24ef5e));_0x672581(_0x24ef5e);})[_0x70a1('0x15')](function(_0x3fcd68){logger[_0x70a1('0x11')](_0x70a1('0x16'),_0x3fcd68['message'],_0x190b60);_0x5d5dde(_0x55f78d['error'](0x1f4,_0x3fcd68['message']));});});};exports[_0x70a1('0x1d')]=function(_0x261d18){var _0x24e14b=this;return new Promise(function(_0x335083,_0x182e0b){return db[_0x70a1('0x17')][_0x70a1('0x1e')](_0x261d18[_0x70a1('0x19')],{'raw':_0x261d18[_0x70a1('0x1a')]?_0x261d18[_0x70a1('0x1a')][_0x70a1('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x261d18[_0x70a1('0x1a')]?_0x261d18[_0x70a1('0x1a')][_0x70a1('0x20')]||null:null,'attributes':_0x261d18['options']?_0x261d18['options'][_0x70a1('0x21')]||null:null,'limit':_0x261d18[_0x70a1('0x1a')]?_0x261d18[_0x70a1('0x1a')][_0x70a1('0x22')]||null:null})[_0x70a1('0x1b')](function(_0x585b24){logger['info'](_0x70a1('0x1d'),_0x261d18);logger[_0x70a1('0xd')]('UpdateChatQueueReport',_0x261d18,JSON[_0x70a1('0x10')](_0x585b24));_0x335083(_0x585b24);})[_0x70a1('0x15')](function(_0x503984){logger[_0x70a1('0x11')]('UpdateChatQueueReport',_0x503984[_0x70a1('0x13')],_0x261d18);_0x182e0b(_0x24e14b['error'](0x1f4,_0x503984[_0x70a1('0x13')]));});});};
\ No newline at end of file
+var _0x6d79=['../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','catch','ChatQueueReport','create','body','options','raw','CreateChatQueueReport','UpdateChatQueueReport','update','where','attributes','limit','lodash','moment','bluebird','../../mysqldb','../../config/utils'];(function(_0x2348b2,_0x342afa){var _0x5c875c=function(_0x279040){while(--_0x279040){_0x2348b2['push'](_0x2348b2['shift']());}};_0x5c875c(++_0x342afa);}(_0x6d79,0x103));var _0x96d7=function(_0x33abdf,_0x35826e){_0x33abdf=_0x33abdf-0x0;var _0x4c32b4=_0x6d79[_0x33abdf];return _0x4c32b4;};'use strict';var _=require(_0x96d7('0x0'));var util=require('util');var moment=require(_0x96d7('0x1'));var BPromise=require(_0x96d7('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x96d7('0x3'))['db'];var utils=require(_0x96d7('0x4'));var logger=require(_0x96d7('0x5'))('rpc');var config=require(_0x96d7('0x6'));var jayson=require(_0x96d7('0x7'));var client=jayson[_0x96d7('0x8')][_0x96d7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x435da4,_0xd02ba1,_0x565aed){return new BPromise(function(_0x30eb49,_0x117195){return client[_0x96d7('0xa')](_0x435da4,_0x565aed)[_0x96d7('0xb')](function(_0x550b63){logger[_0x96d7('0xc')](_0x96d7('0xd'),_0xd02ba1,_0x96d7('0xe'));logger[_0x96d7('0xf')](_0x96d7('0x10'),_0xd02ba1,_0x96d7('0xe'),JSON[_0x96d7('0x11')](_0x550b63));if(_0x550b63['error']){if(_0x550b63['error'][_0x96d7('0x12')]===0x1f4){logger[_0x96d7('0x13')](_0x96d7('0xd'),_0xd02ba1,_0x550b63[_0x96d7('0x13')][_0x96d7('0x14')]);return _0x117195(_0x550b63[_0x96d7('0x13')]['message']);}logger['error'](_0x96d7('0xd'),_0xd02ba1,_0x550b63[_0x96d7('0x13')]['message']);return _0x30eb49(_0x550b63['error'][_0x96d7('0x14')]);}else{logger['info'](_0x96d7('0xd'),_0xd02ba1,'request\x20sent');_0x30eb49(_0x550b63['result']['message']);}})[_0x96d7('0x15')](function(_0xd57a1f){logger['error'](_0x96d7('0xd'),_0xd02ba1,_0xd57a1f);_0x117195(_0xd57a1f);});});}exports['CreateChatQueueReport']=function(_0x3b1514){var _0x3bfb72=this;return new Promise(function(_0x55a958,_0x397b50){return db[_0x96d7('0x16')][_0x96d7('0x17')](_0x3b1514[_0x96d7('0x18')],{'raw':_0x3b1514['options']?_0x3b1514[_0x96d7('0x19')][_0x96d7('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x383816){logger[_0x96d7('0xc')](_0x96d7('0x1b'),_0x3b1514);logger[_0x96d7('0xf')]('CreateChatQueueReport',_0x3b1514,JSON['stringify'](_0x383816));_0x55a958(_0x383816);})[_0x96d7('0x15')](function(_0x4d500d){logger[_0x96d7('0x13')](_0x96d7('0x1b'),_0x4d500d[_0x96d7('0x14')],_0x3b1514);_0x397b50(_0x3bfb72[_0x96d7('0x13')](0x1f4,_0x4d500d[_0x96d7('0x14')]));});});};exports[_0x96d7('0x1c')]=function(_0x5f323f){var _0x27db8d=this;return new Promise(function(_0x1329f6,_0x3e9753){return db[_0x96d7('0x16')][_0x96d7('0x1d')](_0x5f323f[_0x96d7('0x18')],{'raw':_0x5f323f[_0x96d7('0x19')]?_0x5f323f[_0x96d7('0x19')][_0x96d7('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5f323f['options']?_0x5f323f[_0x96d7('0x19')][_0x96d7('0x1e')]||null:null,'attributes':_0x5f323f[_0x96d7('0x19')]?_0x5f323f[_0x96d7('0x19')][_0x96d7('0x1f')]||null:null,'limit':_0x5f323f[_0x96d7('0x19')]?_0x5f323f[_0x96d7('0x19')][_0x96d7('0x20')]||null:null})[_0x96d7('0xb')](function(_0x6c2746){logger[_0x96d7('0xc')](_0x96d7('0x1c'),_0x5f323f);logger['debug'](_0x96d7('0x1c'),_0x5f323f,JSON[_0x96d7('0x11')](_0x6c2746));_0x1329f6(_0x6c2746);})[_0x96d7('0x15')](function(_0x544093){logger[_0x96d7('0x13')](_0x96d7('0x1c'),_0x544093[_0x96d7('0x14')],_0x5f323f);_0x3e9753(_0x27db8d[_0x96d7('0x13')](0x1f4,_0x544093[_0x96d7('0x14')]));});});};
\ No newline at end of file