Built motion from commit 8d1370ff4.|1.0.34
[motion.git] / server / config / scheduler / index.js
index fe71103..8287fe5 100644 (file)
@@ -1 +1 @@
-var _0x3cc8=["\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x63\x72\x6F\x6E\x2D\x6A\x6F\x62\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x73","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20","\x6E\x61\x6D\x65","\x20\x6A\x6F\x62","\x6C\x6F\x67","\x69\x64","\x65\x78\x69\x73\x74\x73","\x64\x65\x6C\x65\x74\x65\x4A\x6F\x62","\x49\x20\x67\x6F\x74\x20\x74\x68\x65\x20\x63\x75\x72\x72\x65\x6E\x74\x20\x6A\x6F\x62\x73\x3A\x20","\x4A\x6F\x62\x20","\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x55\x70\x64\x61\x74\x69\x6E\x67\x20","\x61\x63\x74\x69\x76\x65","\x65\x78\x70\x6F\x72\x74\x73","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x2F\x73\x65\x74\x74\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x73","\x63\x61\x74\x63\x68","\x66\x69\x6E\x61\x6C\x6C\x79","\x72\x6F\x77\x73","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x74\x79\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x27","\x27\x20\x6A\x6F\x62","\x30\x30\x20","\x63\x72\x6F\x6E","\x20\x73\x74\x6F\x70\x70\x65\x64","\x61\x64\x64","\x4A\x6F\x62\x20\x27","\x27\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x45\x72\x72\x6F\x72\x20\x72\x65\x74\x72\x69\x65\x76\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x21","\x53\x63\x68\x65\x64\x75\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79"];var Schedule=require(_0x3cc8[1])[_0x3cc8[0]];var MailAccount=require(_0x3cc8[1])[_0x3cc8[2]];var CronJobManager=require(_0x3cc8[3]);var _=require(_0x3cc8[4]);var Reports=require(_0x3cc8[5]);function deleteSchedule(_0xf4edx7,_0xf4edx8){console[_0x3cc8[9]](_0x3cc8[6]+_0xf4edx7[_0x3cc8[7]]+_0x3cc8[8]);if(_0xf4edx8[_0x3cc8[11]](_0xf4edx7[_0x3cc8[10]].toString())){_0xf4edx8[_0x3cc8[12]](_0xf4edx7[_0x3cc8[10]].toString());console[_0x3cc8[9]](_0x3cc8[13]+_0xf4edx8)}else {console[_0x3cc8[9]](_0x3cc8[14]+_0xf4edx7[_0x3cc8[7]]+_0x3cc8[15])}}function updateSchedule(_0xf4edx7,_0xf4edx8,_0xf4edxa){console[_0x3cc8[9]](_0x3cc8[16]+_0xf4edx7[_0x3cc8[7]]+_0x3cc8[8]);if(_0xf4edx7[_0x3cc8[17]]){createJob(_0xf4edx7,_0xf4edx8,_0xf4edxa)}else {deleteSchedule(_0xf4edx7,_0xf4edx8)}}module[_0x3cc8[18]]=function(){var _0xf4edx8= new CronJobManager();var _0xf4edxa= new Reports();Schedule[_0x3cc8[26]]({where:{active:true},include:[MailAccount],attributes:[_0x3cc8[10],_0x3cc8[7],_0x3cc8[25],_0x3cc8[17]]})[_0x3cc8[24]](function(_0xf4edxc){_[_0x3cc8[23]](_0xf4edxc[_0x3cc8[22]],function(_0xf4edxd){createJob(_0xf4edxd,_0xf4edx8,_0xf4edxa)})})[_0x3cc8[21]](function(){synchSchedules(_0xf4edx8,_0xf4edxa)})[_0x3cc8[20]](function(_0xf4edxb){console[_0x3cc8[9]](_0x3cc8[19])})};function createJob(_0xf4edxd,_0xf4edx8,_0xf4edxa){console[_0x3cc8[9]](_0x3cc8[27]+_0xf4edxd[_0x3cc8[7]]+_0x3cc8[28]);_0xf4edx8[_0x3cc8[32]](_0xf4edxd[_0x3cc8[10]].toString(),_0x3cc8[29]+_0xf4edxd[_0x3cc8[30]],function(){executeSchedule(_0xf4edxd[_0x3cc8[10]],_0xf4edxa)},{start:true,completion:function(){console[_0x3cc8[9]](_0x3cc8[14]+_0xf4edxd[_0x3cc8[7]]+_0x3cc8[31])}});console[_0x3cc8[9]](_0x3cc8[33]+_0xf4edxd[_0x3cc8[7]]+_0x3cc8[34]);console[_0x3cc8[9]](_0x3cc8[13]+_0xf4edx8)}function executeSchedule(_0xf4edx10,_0xf4edxa){return Schedule[_0x3cc8[39]](_0xf4edx10)[_0x3cc8[24]](function(_0xf4edxd){if(!_0xf4edxd){console[_0x3cc8[9]](_0x3cc8[36]);return};switch(_0xf4edxd[_0x3cc8[25]]){case _0x3cc8[38]:_0xf4edxa[_0x3cc8[37]](_0xf4edxd);break;default:}})[_0x3cc8[20]](function(_0xf4edxb){console[_0x3cc8[9]](_0x3cc8[35])})}function synchSchedules(_0xf4edx8,_0xf4edxa){Schedule[_0x3cc8[41]](function(_0xf4edx12,_0xf4edx13){if(_0xf4edx12[_0x3cc8[17]]){createJob(_0xf4edx12[_0x3cc8[40]],_0xf4edx8,_0xf4edxa)}});Schedule[_0x3cc8[43]](function(_0xf4edx12,_0xf4edx13){if(_0xf4edx12[_0x3cc8[42]](_0x3cc8[17])){updateSchedule(_0xf4edx12[_0x3cc8[40]],_0xf4edx8,_0xf4edxa)}});Schedule[_0x3cc8[44]](function(_0xf4edx12){deleteSchedule(_0xf4edx12[_0x3cc8[40]],_0xf4edx8)})}
\ No newline at end of file
+var _0xb4f8=["\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x63\x72\x6F\x6E\x2D\x6A\x6F\x62\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x73","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20","\x6E\x61\x6D\x65","\x20\x6A\x6F\x62","\x64\x65\x62\x75\x67","\x69\x64","\x65\x78\x69\x73\x74\x73","\x64\x65\x6C\x65\x74\x65\x4A\x6F\x62","\x49\x20\x67\x6F\x74\x20\x74\x68\x65\x20\x63\x75\x72\x72\x65\x6E\x74\x20\x6A\x6F\x62\x73\x3A\x20","\x4A\x6F\x62\x20","\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x55\x70\x64\x61\x74\x69\x6E\x67\x20","\x61\x63\x74\x69\x76\x65","\x65\x78\x70\x6F\x72\x74\x73","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x2F\x73\x65\x74\x74\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x69\x6E\x61\x6C\x6C\x79","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x74\x79\x70\x65","\x63\x72\x6F\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x27","\x27\x20\x6A\x6F\x62","\x30\x30\x20","\x20\x73\x74\x6F\x70\x70\x65\x64","\x61\x64\x64","\x4A\x6F\x62\x20\x27","\x27\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x20","\x69\x6E\x66\x6F","\x45\x72\x72\x6F\x72\x20\x72\x65\x74\x72\x69\x65\x76\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x21","\x73\x74\x61\x63\x6B","\x53\x63\x68\x65\x64\x75\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79"];var Schedule=require(_0xb4f8[1])[_0xb4f8[0]];var MailServerOut=require(_0xb4f8[1])[_0xb4f8[2]];var CronJobManager=require(_0xb4f8[3]);var _=require(_0xb4f8[4]);var Reports=require(_0xb4f8[5]);var logger=require(_0xb4f8[7])(_0xb4f8[6]);function deleteSchedule(_0xc0ebx8,_0xc0ebx9){logger[_0xb4f8[11]](_0xb4f8[8]+ _0xc0ebx8[_0xb4f8[9]]+ _0xb4f8[10]);if(_0xc0ebx9[_0xb4f8[13]](_0xc0ebx8[_0xb4f8[12]].toString())){_0xc0ebx9[_0xb4f8[14]](_0xc0ebx8[_0xb4f8[12]].toString());logger[_0xb4f8[11]](_0xb4f8[15]+ _0xc0ebx9)}else {logger[_0xb4f8[11]](_0xb4f8[16]+ _0xc0ebx8[_0xb4f8[9]]+ _0xb4f8[17])}}function updateSchedule(_0xc0ebx8,_0xc0ebx9,_0xc0ebxb){logger[_0xb4f8[11]](_0xb4f8[18]+ _0xc0ebx8[_0xb4f8[9]]+ _0xb4f8[10]);if(_0xc0ebx8[_0xb4f8[19]]){createJob(_0xc0ebx8,_0xc0ebx9,_0xc0ebxb)}else {deleteSchedule(_0xc0ebx8,_0xc0ebx9)}}module[_0xb4f8[20]]= function(){var _0xc0ebx9= new CronJobManager();var _0xc0ebxb= new Reports();Schedule[_0xb4f8[29]]({where:{active:true},attributes:[_0xb4f8[12],_0xb4f8[9],_0xb4f8[27],_0xb4f8[19],_0xb4f8[28]]})[_0xb4f8[26]](function(_0xc0ebxd){_[_0xb4f8[25]](_0xc0ebxd,function(_0xc0ebxe){createJob(_0xc0ebxe,_0xc0ebx9,_0xc0ebxb)})})[_0xb4f8[24]](function(){synchSchedules(_0xc0ebx9,_0xc0ebxb)})[_0xb4f8[23]](function(_0xc0ebxc){logger[_0xb4f8[22]](_0xb4f8[21])})};function createJob(_0xc0ebxe,_0xc0ebx9,_0xc0ebxb){logger[_0xb4f8[11]](_0xb4f8[30]+ _0xc0ebxe[_0xb4f8[9]]+ _0xb4f8[31]);_0xc0ebx9[_0xb4f8[34]](_0xc0ebxe[_0xb4f8[12]].toString(),_0xb4f8[32]+ _0xc0ebxe[_0xb4f8[28]],function(){executeSchedule(_0xc0ebxe[_0xb4f8[12]],_0xc0ebxb)},{start:true,completion:function(){logger[_0xb4f8[11]](_0xb4f8[16]+ _0xc0ebxe[_0xb4f8[9]]+ _0xb4f8[33])}});logger[_0xb4f8[11]](_0xb4f8[35]+ _0xc0ebxe[_0xb4f8[9]]+ _0xb4f8[36]);logger[_0xb4f8[11]](_0xb4f8[15]+ _0xc0ebx9)}function executeSchedule(_0xc0ebx11,_0xc0ebxb){logger[_0xb4f8[38]](_0xb4f8[37],_0xc0ebx11);return Schedule[_0xb4f8[44]](_0xc0ebx11,{include:[MailServerOut]})[_0xb4f8[26]](function(_0xc0ebxe){if(!_0xc0ebxe){logger[_0xb4f8[22]](_0xb4f8[41]);return};switch(_0xc0ebxe[_0xb4f8[27]]){case _0xb4f8[43]:_0xc0ebxb[_0xb4f8[42]](_0xc0ebxe);break;default:}})[_0xb4f8[23]](function(_0xc0ebxc){logger[_0xb4f8[22]](_0xb4f8[39],_0xc0ebxc[_0xb4f8[40]])})}function synchSchedules(_0xc0ebx9,_0xc0ebxb){Schedule[_0xb4f8[46]](function(_0xc0ebx13,_0xc0ebx14){if(_0xc0ebx13[_0xb4f8[19]]){createJob(_0xc0ebx13[_0xb4f8[45]],_0xc0ebx9,_0xc0ebxb)}});Schedule[_0xb4f8[47]](function(_0xc0ebx13,_0xc0ebx14){updateSchedule(_0xc0ebx13[_0xb4f8[45]],_0xc0ebx9,_0xc0ebxb)});Schedule[_0xb4f8[48]](function(_0xc0ebx13){deleteSchedule(_0xc0ebx13[_0xb4f8[45]],_0xc0ebx9)})}
\ No newline at end of file