Built motion from commit (unavailable).|2.5.1
[motion2.git] / server / api / mailQueueReport / mailQueueReport.rpc.js
index 6da70e6..dd43cdc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f8a=['code','message','info','result','catch','CreateMailQueueReport','create','body','options','UpdateMailQueueReport','MailQueueReport','update','where','limit','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug','MailQueueReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x16c425,_0x3c95d3){var _0x4bb082=function(_0x50f8fa){while(--_0x50f8fa){_0x16c425['push'](_0x16c425['shift']());}};_0x4bb082(++_0x3c95d3);}(_0x3f8a,0x1d5));var _0xa3f8=function(_0x26132e,_0x5c7869){_0x26132e=_0x26132e-0x0;var _0x7cca72=_0x3f8a[_0x26132e];return _0x7cca72;};'use strict';var _=require(_0xa3f8('0x0'));var util=require(_0xa3f8('0x1'));var moment=require(_0xa3f8('0x2'));var BPromise=require(_0xa3f8('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa3f8('0x4'));var db=require(_0xa3f8('0x5'))['db'];var utils=require(_0xa3f8('0x6'));var logger=require(_0xa3f8('0x7'))(_0xa3f8('0x8'));var config=require(_0xa3f8('0x9'));var jayson=require(_0xa3f8('0xa'));var client=jayson[_0xa3f8('0xb')][_0xa3f8('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xf895d9,_0xcfea5,_0x268332){return new BPromise(function(_0x2faf2e,_0x2448de){return client[_0xa3f8('0xd')](_0xf895d9,_0x268332)[_0xa3f8('0xe')](function(_0xcdb0d4){logger['info'](_0xa3f8('0xf'),_0xcfea5,_0xa3f8('0x10'));logger[_0xa3f8('0x11')](_0xa3f8('0x12'),_0xcfea5,'request\x20sent',JSON[_0xa3f8('0x13')](_0xcdb0d4));if(_0xcdb0d4[_0xa3f8('0x14')]){if(_0xcdb0d4[_0xa3f8('0x14')][_0xa3f8('0x15')]===0x1f4){logger[_0xa3f8('0x14')](_0xa3f8('0xf'),_0xcfea5,_0xcdb0d4[_0xa3f8('0x14')][_0xa3f8('0x16')]);return _0x2448de(_0xcdb0d4[_0xa3f8('0x14')][_0xa3f8('0x16')]);}logger[_0xa3f8('0x14')](_0xa3f8('0xf'),_0xcfea5,_0xcdb0d4['error'][_0xa3f8('0x16')]);return _0x2faf2e(_0xcdb0d4[_0xa3f8('0x14')][_0xa3f8('0x16')]);}else{logger[_0xa3f8('0x17')]('MailQueueReport,\x20%s,\x20%s',_0xcfea5,_0xa3f8('0x10'));_0x2faf2e(_0xcdb0d4[_0xa3f8('0x18')][_0xa3f8('0x16')]);}})[_0xa3f8('0x19')](function(_0x45ef64){logger[_0xa3f8('0x14')](_0xa3f8('0xf'),_0xcfea5,_0x45ef64);_0x2448de(_0x45ef64);});});}exports[_0xa3f8('0x1a')]=function(_0x2cb49f){var _0x267e73=this;return new Promise(function(_0x54b870,_0x3ad8cd){return db['MailQueueReport'][_0xa3f8('0x1b')](_0x2cb49f[_0xa3f8('0x1c')],{'raw':_0x2cb49f[_0xa3f8('0x1d')]?_0x2cb49f[_0xa3f8('0x1d')]['raw']===undefined?!![]:![]:!![]})[_0xa3f8('0xe')](function(_0x5b0d57){logger[_0xa3f8('0x17')]('CreateMailQueueReport',_0x2cb49f);logger[_0xa3f8('0x11')](_0xa3f8('0x1a'),_0x2cb49f,JSON[_0xa3f8('0x13')](_0x5b0d57));_0x54b870(_0x5b0d57);})[_0xa3f8('0x19')](function(_0x3a6a57){logger[_0xa3f8('0x14')](_0xa3f8('0x1a'),_0x3a6a57['message'],_0x2cb49f);_0x3ad8cd(_0x267e73[_0xa3f8('0x14')](0x1f4,_0x3a6a57['message']));});});};exports[_0xa3f8('0x1e')]=function(_0xa5a697){var _0x24985a=this;return new Promise(function(_0x37b290,_0x24ead6){return db[_0xa3f8('0x1f')][_0xa3f8('0x20')](_0xa5a697[_0xa3f8('0x1c')],{'raw':_0xa5a697[_0xa3f8('0x1d')]?_0xa5a697[_0xa3f8('0x1d')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xa5a697[_0xa3f8('0x1d')]?_0xa5a697[_0xa3f8('0x1d')][_0xa3f8('0x21')]||null:null,'attributes':_0xa5a697['options']?_0xa5a697[_0xa3f8('0x1d')]['attributes']||null:null,'limit':_0xa5a697[_0xa3f8('0x1d')]?_0xa5a697[_0xa3f8('0x1d')][_0xa3f8('0x22')]||null:null})['then'](function(_0x458824){logger['info'](_0xa3f8('0x1e'),_0xa5a697);logger[_0xa3f8('0x11')](_0xa3f8('0x1e'),_0xa5a697,JSON[_0xa3f8('0x13')](_0x458824));_0x37b290(_0x458824);})[_0xa3f8('0x19')](function(_0x3bf3f8){logger[_0xa3f8('0x14')](_0xa3f8('0x1e'),_0x3bf3f8[_0xa3f8('0x16')],_0xa5a697);_0x24ead6(_0x24985a[_0xa3f8('0x14')](0x1f4,_0x3bf3f8[_0xa3f8('0x16')]));});});};
\ No newline at end of file
+var _0x2ef3=['options','raw','UpdateMailQueueReport','where','attributes','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','then','info','MailQueueReport,\x20%s,\x20%s','MailQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','CreateMailQueueReport','MailQueueReport','body'];(function(_0x8ee4e8,_0x192cf2){var _0x4b1ec4=function(_0xc3cfa5){while(--_0xc3cfa5){_0x8ee4e8['push'](_0x8ee4e8['shift']());}};_0x4b1ec4(++_0x192cf2);}(_0x2ef3,0xba));var _0x32ef=function(_0x55da6e,_0x4dedea){_0x55da6e=_0x55da6e-0x0;var _0x4b7397=_0x2ef3[_0x55da6e];return _0x4b7397;};'use strict';var _=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var moment=require(_0x32ef('0x2'));var BPromise=require(_0x32ef('0x3'));var rs=require(_0x32ef('0x4'));var fs=require('fs');var Redis=require(_0x32ef('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x32ef('0x6'));var logger=require(_0x32ef('0x7'))('rpc');var config=require(_0x32ef('0x8'));var jayson=require(_0x32ef('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2c0089,_0x4bfcf8,_0x367c39){return new BPromise(function(_0x2fb8eb,_0x234863){return client[_0x32ef('0xa')](_0x2c0089,_0x367c39)[_0x32ef('0xb')](function(_0x2bbb50){logger[_0x32ef('0xc')](_0x32ef('0xd'),_0x4bfcf8,'request\x20sent');logger['debug'](_0x32ef('0xe'),_0x4bfcf8,_0x32ef('0xf'),JSON[_0x32ef('0x10')](_0x2bbb50));if(_0x2bbb50[_0x32ef('0x11')]){if(_0x2bbb50['error'][_0x32ef('0x12')]===0x1f4){logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x234863(_0x2bbb50[_0x32ef('0x11')]['message']);}logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x2fb8eb(_0x2bbb50[_0x32ef('0x11')][_0x32ef('0x13')]);}else{logger[_0x32ef('0xc')]('MailQueueReport,\x20%s,\x20%s',_0x4bfcf8,'request\x20sent');_0x2fb8eb(_0x2bbb50['result'][_0x32ef('0x13')]);}})[_0x32ef('0x14')](function(_0xb5aed2){logger['error']('MailQueueReport,\x20%s,\x20%s',_0x4bfcf8,_0xb5aed2);_0x234863(_0xb5aed2);});});}exports[_0x32ef('0x15')]=function(_0x1a9476){var _0x286bfb=this;return new Promise(function(_0x57863c,_0xbe37f6){return db[_0x32ef('0x16')]['create'](_0x1a9476[_0x32ef('0x17')],{'raw':_0x1a9476[_0x32ef('0x18')]?_0x1a9476[_0x32ef('0x18')][_0x32ef('0x19')]===undefined?!![]:![]:!![]})[_0x32ef('0xb')](function(_0x3aec05){logger['info'](_0x32ef('0x15'),_0x1a9476);logger['debug'](_0x32ef('0x15'),_0x1a9476,JSON[_0x32ef('0x10')](_0x3aec05));_0x57863c(_0x3aec05);})['catch'](function(_0x1af371){logger[_0x32ef('0x11')](_0x32ef('0x15'),_0x1af371['message'],_0x1a9476);_0xbe37f6(_0x286bfb['error'](0x1f4,_0x1af371[_0x32ef('0x13')]));});});};exports[_0x32ef('0x1a')]=function(_0x225feb){var _0x478bef=this;return new Promise(function(_0x59585f,_0x19ea6){return db['MailQueueReport']['update'](_0x225feb[_0x32ef('0x17')],{'raw':_0x225feb[_0x32ef('0x18')]?_0x225feb[_0x32ef('0x18')][_0x32ef('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x225feb[_0x32ef('0x18')]?_0x225feb[_0x32ef('0x18')][_0x32ef('0x1b')]||null:null,'attributes':_0x225feb[_0x32ef('0x18')]?_0x225feb[_0x32ef('0x18')][_0x32ef('0x1c')]||null:null,'limit':_0x225feb[_0x32ef('0x18')]?_0x225feb[_0x32ef('0x18')]['limit']||null:null})[_0x32ef('0xb')](function(_0x2f5d06){logger['info'](_0x32ef('0x1a'),_0x225feb);logger[_0x32ef('0x1d')](_0x32ef('0x1a'),_0x225feb,JSON[_0x32ef('0x10')](_0x2f5d06));_0x59585f(_0x2f5d06);})['catch'](function(_0x10e38c){logger[_0x32ef('0x11')](_0x32ef('0x1a'),_0x10e38c[_0x32ef('0x13')],_0x225feb);_0x19ea6(_0x478bef[_0x32ef('0x11')](0x1f4,_0x10e38c[_0x32ef('0x13')]));});});};
\ No newline at end of file