Built motion from commit e0fa946e.|2.6.5
[motion2.git] / server / api / mailQueueReport / mailQueueReport.rpc.js
index ee8b799..c7f14f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1ad3=['then','info','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug','MailQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','create','body','options','raw','CreateMailQueueReport','UpdateMailQueueReport','MailQueueReport','update','where','attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','request'];(function(_0x447e23,_0x51f4ac){var _0x45a855=function(_0x2dd332){while(--_0x2dd332){_0x447e23['push'](_0x447e23['shift']());}};_0x45a855(++_0x51f4ac);}(_0x1ad3,0x198));var _0x31ad=function(_0x11155f,_0x57b687){_0x11155f=_0x11155f-0x0;var _0xd07e48=_0x1ad3[_0x11155f];return _0xd07e48;};'use strict';var _=require(_0x31ad('0x0'));var util=require(_0x31ad('0x1'));var moment=require(_0x31ad('0x2'));var BPromise=require(_0x31ad('0x3'));var rs=require(_0x31ad('0x4'));var fs=require('fs');var Redis=require(_0x31ad('0x5'));var db=require(_0x31ad('0x6'))['db'];var utils=require(_0x31ad('0x7'));var logger=require(_0x31ad('0x8'))('rpc');var config=require(_0x31ad('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x31ad('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x31b180,_0x1c3c15,_0x43d93d){return new BPromise(function(_0x40061a,_0x1f31e9){return client[_0x31ad('0xb')](_0x31b180,_0x43d93d)[_0x31ad('0xc')](function(_0x2e5731){logger[_0x31ad('0xd')](_0x31ad('0xe'),_0x1c3c15,_0x31ad('0xf'));logger[_0x31ad('0x10')](_0x31ad('0x11'),_0x1c3c15,_0x31ad('0xf'),JSON[_0x31ad('0x12')](_0x2e5731));if(_0x2e5731['error']){if(_0x2e5731[_0x31ad('0x13')][_0x31ad('0x14')]===0x1f4){logger[_0x31ad('0x13')](_0x31ad('0xe'),_0x1c3c15,_0x2e5731[_0x31ad('0x13')][_0x31ad('0x15')]);return _0x1f31e9(_0x2e5731[_0x31ad('0x13')][_0x31ad('0x15')]);}logger[_0x31ad('0x13')](_0x31ad('0xe'),_0x1c3c15,_0x2e5731[_0x31ad('0x13')]['message']);return _0x40061a(_0x2e5731[_0x31ad('0x13')][_0x31ad('0x15')]);}else{logger[_0x31ad('0xd')](_0x31ad('0xe'),_0x1c3c15,_0x31ad('0xf'));_0x40061a(_0x2e5731[_0x31ad('0x16')][_0x31ad('0x15')]);}})[_0x31ad('0x17')](function(_0x423b85){logger[_0x31ad('0x13')]('MailQueueReport,\x20%s,\x20%s',_0x1c3c15,_0x423b85);_0x1f31e9(_0x423b85);});});}exports['CreateMailQueueReport']=function(_0x39c2c5){var _0x108c2a=this;return new Promise(function(_0x1ec3c7,_0x3ac978){return db['MailQueueReport'][_0x31ad('0x18')](_0x39c2c5[_0x31ad('0x19')],{'raw':_0x39c2c5[_0x31ad('0x1a')]?_0x39c2c5[_0x31ad('0x1a')][_0x31ad('0x1b')]===undefined?!![]:![]:!![]})[_0x31ad('0xc')](function(_0xb83d92){logger[_0x31ad('0xd')](_0x31ad('0x1c'),_0x39c2c5);logger['debug'](_0x31ad('0x1c'),_0x39c2c5,JSON[_0x31ad('0x12')](_0xb83d92));_0x1ec3c7(_0xb83d92);})[_0x31ad('0x17')](function(_0x157eb7){logger[_0x31ad('0x13')]('CreateMailQueueReport',_0x157eb7[_0x31ad('0x15')],_0x39c2c5);_0x3ac978(_0x108c2a[_0x31ad('0x13')](0x1f4,_0x157eb7['message']));});});};exports[_0x31ad('0x1d')]=function(_0x38097f){var _0x3dd00c=this;return new Promise(function(_0x5c64b7,_0x1212f1){return db[_0x31ad('0x1e')][_0x31ad('0x1f')](_0x38097f[_0x31ad('0x19')],{'raw':_0x38097f[_0x31ad('0x1a')]?_0x38097f[_0x31ad('0x1a')][_0x31ad('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x38097f[_0x31ad('0x1a')]?_0x38097f[_0x31ad('0x1a')][_0x31ad('0x20')]||null:null,'attributes':_0x38097f[_0x31ad('0x1a')]?_0x38097f[_0x31ad('0x1a')][_0x31ad('0x21')]||null:null,'limit':_0x38097f[_0x31ad('0x1a')]?_0x38097f['options'][_0x31ad('0x22')]||null:null})[_0x31ad('0xc')](function(_0x147edd){logger[_0x31ad('0xd')](_0x31ad('0x1d'),_0x38097f);logger[_0x31ad('0x10')]('UpdateMailQueueReport',_0x38097f,JSON[_0x31ad('0x12')](_0x147edd));_0x5c64b7(_0x147edd);})['catch'](function(_0x5c6338){logger[_0x31ad('0x13')]('UpdateMailQueueReport',_0x5c6338[_0x31ad('0x15')],_0x38097f);_0x1212f1(_0x3dd00c[_0x31ad('0x13')](0x1f4,_0x5c6338[_0x31ad('0x15')]));});});};
\ No newline at end of file
+var _0x326f=['error','code','message','result','catch','CreateMailQueueReport','MailQueueReport','options','raw','stringify','UpdateMailQueueReport','body','attributes','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','info','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x5a532f,_0x5f4f23){var _0x165916=function(_0x2a247f){while(--_0x2a247f){_0x5a532f['push'](_0x5a532f['shift']());}};_0x165916(++_0x5f4f23);}(_0x326f,0xd1));var _0xf326=function(_0x320fe1,_0x1f3218){_0x320fe1=_0x320fe1-0x0;var _0x12c0bc=_0x326f[_0x320fe1];return _0x12c0bc;};'use strict';var _=require(_0xf326('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf326('0x1'));var rs=require(_0xf326('0x2'));var fs=require('fs');var Redis=require(_0xf326('0x3'));var db=require(_0xf326('0x4'))['db'];var utils=require(_0xf326('0x5'));var logger=require(_0xf326('0x6'))(_0xf326('0x7'));var config=require(_0xf326('0x8'));var jayson=require(_0xf326('0x9'));var client=jayson[_0xf326('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3c254d,_0x3851eb,_0x165f95){return new BPromise(function(_0x1e7b8a,_0x515bfa){return client['request'](_0x3c254d,_0x165f95)['then'](function(_0x3bacf2){logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));logger[_0xf326('0xe')]('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x3851eb,_0xf326('0xd'),JSON['stringify'](_0x3bacf2));if(_0x3bacf2[_0xf326('0xf')]){if(_0x3bacf2['error'][_0xf326('0x10')]===0x1f4){logger['error'](_0xf326('0xc'),_0x3851eb,_0x3bacf2[_0xf326('0xf')]['message']);return _0x515bfa(_0x3bacf2[_0xf326('0xf')][_0xf326('0x11')]);}logger[_0xf326('0xf')](_0xf326('0xc'),_0x3851eb,_0x3bacf2['error'][_0xf326('0x11')]);return _0x1e7b8a(_0x3bacf2['error']['message']);}else{logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));_0x1e7b8a(_0x3bacf2[_0xf326('0x12')][_0xf326('0x11')]);}})[_0xf326('0x13')](function(_0x34128e){logger[_0xf326('0xf')]('MailQueueReport,\x20%s,\x20%s',_0x3851eb,_0x34128e);_0x515bfa(_0x34128e);});});}exports[_0xf326('0x14')]=function(_0x453100){var _0x18bee3=this;return new Promise(function(_0x31ffb9,_0xcef2b5){return db[_0xf326('0x15')]['create'](_0x453100['body'],{'raw':_0x453100['options']?_0x453100[_0xf326('0x16')][_0xf326('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x4cabce){logger[_0xf326('0xb')]('CreateMailQueueReport',_0x453100);logger['debug'](_0xf326('0x14'),_0x453100,JSON[_0xf326('0x18')](_0x4cabce));_0x31ffb9(_0x4cabce);})['catch'](function(_0x5aa184){logger[_0xf326('0xf')](_0xf326('0x14'),_0x5aa184['message'],_0x453100);_0xcef2b5(_0x18bee3[_0xf326('0xf')](0x1f4,_0x5aa184[_0xf326('0x11')]));});});};exports[_0xf326('0x19')]=function(_0x295752){var _0x17c157=this;return new Promise(function(_0x2049ec,_0x5ce532){return db['MailQueueReport']['update'](_0x295752[_0xf326('0x1a')],{'raw':_0x295752[_0xf326('0x16')]?_0x295752[_0xf326('0x16')][_0xf326('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x295752[_0xf326('0x16')]?_0x295752[_0xf326('0x16')]['where']||null:null,'attributes':_0x295752[_0xf326('0x16')]?_0x295752[_0xf326('0x16')][_0xf326('0x1b')]||null:null,'limit':_0x295752['options']?_0x295752[_0xf326('0x16')]['limit']||null:null})['then'](function(_0x6a8e89){logger[_0xf326('0xb')](_0xf326('0x19'),_0x295752);logger['debug'](_0xf326('0x19'),_0x295752,JSON[_0xf326('0x18')](_0x6a8e89));_0x2049ec(_0x6a8e89);})['catch'](function(_0x225776){logger[_0xf326('0xf')](_0xf326('0x19'),_0x225776[_0xf326('0x11')],_0x295752);_0x5ce532(_0x17c157[_0xf326('0xf')](0x1f4,_0x225776[_0xf326('0x11')]));});});};
\ No newline at end of file