Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / mailQueueReport / mailQueueReport.rpc.js
index 8076234..7e77056 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb363=['where','limit','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','then','info','request\x20sent','stringify','error','MailQueueReport,\x20%s,\x20%s','message','result','catch','CreateMailQueueReport','create','body','options','raw','debug','UpdateMailQueueReport','MailQueueReport','update'];(function(_0x2da09f,_0x4a5c1e){var _0x51071d=function(_0x5dd263){while(--_0x5dd263){_0x2da09f['push'](_0x2da09f['shift']());}};_0x51071d(++_0x4a5c1e);}(_0xb363,0x1c4));var _0x3b36=function(_0x31e29a,_0x349c9b){_0x31e29a=_0x31e29a-0x0;var _0x32d892=_0xb363[_0x31e29a];return _0x32d892;};'use strict';var _=require('lodash');var util=require(_0x3b36('0x0'));var moment=require('moment');var BPromise=require(_0x3b36('0x1'));var rs=require(_0x3b36('0x2'));var fs=require('fs');var Redis=require(_0x3b36('0x3'));var db=require(_0x3b36('0x4'))['db'];var utils=require(_0x3b36('0x5'));var logger=require(_0x3b36('0x6'))(_0x3b36('0x7'));var config=require('../../config/environment');var jayson=require(_0x3b36('0x8'));var client=jayson[_0x3b36('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x41426e,_0x587496,_0x3da7be){return new BPromise(function(_0x2be2d0,_0x22f158){return client['request'](_0x41426e,_0x3da7be)[_0x3b36('0xa')](function(_0x167323){logger[_0x3b36('0xb')]('MailQueueReport,\x20%s,\x20%s',_0x587496,_0x3b36('0xc'));logger['debug']('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x587496,_0x3b36('0xc'),JSON[_0x3b36('0xd')](_0x167323));if(_0x167323[_0x3b36('0xe')]){if(_0x167323[_0x3b36('0xe')]['code']===0x1f4){logger[_0x3b36('0xe')](_0x3b36('0xf'),_0x587496,_0x167323[_0x3b36('0xe')][_0x3b36('0x10')]);return _0x22f158(_0x167323['error'][_0x3b36('0x10')]);}logger[_0x3b36('0xe')](_0x3b36('0xf'),_0x587496,_0x167323[_0x3b36('0xe')][_0x3b36('0x10')]);return _0x2be2d0(_0x167323[_0x3b36('0xe')][_0x3b36('0x10')]);}else{logger[_0x3b36('0xb')]('MailQueueReport,\x20%s,\x20%s',_0x587496,_0x3b36('0xc'));_0x2be2d0(_0x167323[_0x3b36('0x11')][_0x3b36('0x10')]);}})[_0x3b36('0x12')](function(_0x53b5a0){logger[_0x3b36('0xe')](_0x3b36('0xf'),_0x587496,_0x53b5a0);_0x22f158(_0x53b5a0);});});}exports[_0x3b36('0x13')]=function(_0x1d3470){var _0x4a78f7=this;return new Promise(function(_0x5e2e5b,_0xfe21b2){return db['MailQueueReport'][_0x3b36('0x14')](_0x1d3470[_0x3b36('0x15')],{'raw':_0x1d3470['options']?_0x1d3470[_0x3b36('0x16')][_0x3b36('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0xac5d9c){logger[_0x3b36('0xb')](_0x3b36('0x13'),_0x1d3470);logger[_0x3b36('0x18')]('CreateMailQueueReport',_0x1d3470,JSON['stringify'](_0xac5d9c));_0x5e2e5b(_0xac5d9c);})[_0x3b36('0x12')](function(_0x5f1151){logger['error'](_0x3b36('0x13'),_0x5f1151[_0x3b36('0x10')],_0x1d3470);_0xfe21b2(_0x4a78f7['error'](0x1f4,_0x5f1151[_0x3b36('0x10')]));});});};exports[_0x3b36('0x19')]=function(_0x467085){var _0x1d5fd2=this;return new Promise(function(_0x36cd57,_0x946a9a){return db[_0x3b36('0x1a')][_0x3b36('0x1b')](_0x467085[_0x3b36('0x15')],{'raw':_0x467085[_0x3b36('0x16')]?_0x467085[_0x3b36('0x16')][_0x3b36('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x467085[_0x3b36('0x16')]?_0x467085['options'][_0x3b36('0x1c')]||null:null,'attributes':_0x467085['options']?_0x467085[_0x3b36('0x16')]['attributes']||null:null,'limit':_0x467085[_0x3b36('0x16')]?_0x467085[_0x3b36('0x16')][_0x3b36('0x1d')]||null:null})[_0x3b36('0xa')](function(_0x16aba2){logger[_0x3b36('0xb')](_0x3b36('0x19'),_0x467085);logger[_0x3b36('0x18')](_0x3b36('0x19'),_0x467085,JSON[_0x3b36('0xd')](_0x16aba2));_0x36cd57(_0x16aba2);})['catch'](function(_0x2e1f41){logger[_0x3b36('0xe')](_0x3b36('0x19'),_0x2e1f41['message'],_0x467085);_0x946a9a(_0x1d5fd2[_0x3b36('0xe')](0x1f4,_0x2e1f41['message']));});});};
\ No newline at end of file
+var _0xadb5=['MailQueueReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','CreateMailQueueReport','create','options','raw','debug','MailQueueReport','body','attributes','limit','UpdateMailQueueReport','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info'];(function(_0x3b3e81,_0x34e727){var _0x1c9744=function(_0x35b081){while(--_0x35b081){_0x3b3e81['push'](_0x3b3e81['shift']());}};_0x1c9744(++_0x34e727);}(_0xadb5,0xad));var _0x5adb=function(_0x449161,_0x1ae5a5){_0x449161=_0x449161-0x0;var _0x3dbaed=_0xadb5[_0x449161];return _0x3dbaed;};'use strict';var _=require('lodash');var util=require(_0x5adb('0x0'));var moment=require('moment');var BPromise=require(_0x5adb('0x1'));var rs=require(_0x5adb('0x2'));var fs=require('fs');var Redis=require(_0x5adb('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x5adb('0x4'));var logger=require(_0x5adb('0x5'))(_0x5adb('0x6'));var config=require('../../config/environment');var jayson=require(_0x5adb('0x7'));var client=jayson[_0x5adb('0x8')][_0x5adb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3213e8,_0xdf3776,_0x353885){return new BPromise(function(_0x47228a,_0x6d1b45){return client[_0x5adb('0xa')](_0x3213e8,_0x353885)[_0x5adb('0xb')](function(_0x34f59d){logger[_0x5adb('0xc')](_0x5adb('0xd'),_0xdf3776,_0x5adb('0xe'));logger['debug']('MailQueueReport,\x20%s,\x20%s,\x20%s',_0xdf3776,_0x5adb('0xe'),JSON[_0x5adb('0xf')](_0x34f59d));if(_0x34f59d[_0x5adb('0x10')]){if(_0x34f59d['error'][_0x5adb('0x11')]===0x1f4){logger['error'](_0x5adb('0xd'),_0xdf3776,_0x34f59d['error'][_0x5adb('0x12')]);return _0x6d1b45(_0x34f59d[_0x5adb('0x10')][_0x5adb('0x12')]);}logger['error'](_0x5adb('0xd'),_0xdf3776,_0x34f59d[_0x5adb('0x10')][_0x5adb('0x12')]);return _0x47228a(_0x34f59d['error'][_0x5adb('0x12')]);}else{logger['info'](_0x5adb('0xd'),_0xdf3776,_0x5adb('0xe'));_0x47228a(_0x34f59d[_0x5adb('0x13')][_0x5adb('0x12')]);}})[_0x5adb('0x14')](function(_0x39d24d){logger[_0x5adb('0x10')](_0x5adb('0xd'),_0xdf3776,_0x39d24d);_0x6d1b45(_0x39d24d);});});}exports[_0x5adb('0x15')]=function(_0x529b65){var _0x3fff62=this;return new Promise(function(_0x5de028,_0x1d9e86){return db['MailQueueReport'][_0x5adb('0x16')](_0x529b65['body'],{'raw':_0x529b65['options']?_0x529b65[_0x5adb('0x17')][_0x5adb('0x18')]===undefined?!![]:![]:!![]})[_0x5adb('0xb')](function(_0x1fd4a7){logger[_0x5adb('0xc')]('CreateMailQueueReport',_0x529b65);logger[_0x5adb('0x19')]('CreateMailQueueReport',_0x529b65,JSON['stringify'](_0x1fd4a7));_0x5de028(_0x1fd4a7);})[_0x5adb('0x14')](function(_0x379b33){logger[_0x5adb('0x10')](_0x5adb('0x15'),_0x379b33[_0x5adb('0x12')],_0x529b65);_0x1d9e86(_0x3fff62[_0x5adb('0x10')](0x1f4,_0x379b33[_0x5adb('0x12')]));});});};exports['UpdateMailQueueReport']=function(_0x4b1957){var _0x373cc3=this;return new Promise(function(_0x3220cd,_0x3839fb){return db[_0x5adb('0x1a')]['update'](_0x4b1957[_0x5adb('0x1b')],{'raw':_0x4b1957[_0x5adb('0x17')]?_0x4b1957['options'][_0x5adb('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4b1957[_0x5adb('0x17')]?_0x4b1957[_0x5adb('0x17')]['where']||null:null,'attributes':_0x4b1957[_0x5adb('0x17')]?_0x4b1957[_0x5adb('0x17')][_0x5adb('0x1c')]||null:null,'limit':_0x4b1957[_0x5adb('0x17')]?_0x4b1957[_0x5adb('0x17')][_0x5adb('0x1d')]||null:null})['then'](function(_0x49992e){logger['info'](_0x5adb('0x1e'),_0x4b1957);logger[_0x5adb('0x19')](_0x5adb('0x1e'),_0x4b1957,JSON[_0x5adb('0xf')](_0x49992e));_0x3220cd(_0x49992e);})[_0x5adb('0x14')](function(_0x4de310){logger[_0x5adb('0x10')](_0x5adb('0x1e'),_0x4de310[_0x5adb('0x12')],_0x4b1957);_0x3839fb(_0x373cc3[_0x5adb('0x10')](0x1f4,_0x4de310[_0x5adb('0x12')]));});});};
\ No newline at end of file