|
@@ -345,6 +345,8 @@ class BaseDataMonitor():
|
|
def monitor_proposedBuilding(self):
|
|
def monitor_proposedBuilding(self):
|
|
current_date = getCurrent_date("%Y-%m-%d")
|
|
current_date = getCurrent_date("%Y-%m-%d")
|
|
|
|
|
|
|
|
+ current_hour = getCurrent_date("%H")
|
|
|
|
+
|
|
|
|
|
|
query = BoolQuery(must_queries=[
|
|
query = BoolQuery(must_queries=[
|
|
RangeQuery("update_time",current_date),
|
|
RangeQuery("update_time",current_date),
|
|
@@ -366,13 +368,14 @@ class BaseDataMonitor():
|
|
columns_to_get=ColumnsToGet(return_type=ColumnReturnType.NONE))
|
|
columns_to_get=ColumnsToGet(return_type=ColumnReturnType.NONE))
|
|
|
|
|
|
total_count = total_count_doc+total_count_sp
|
|
total_count = total_count_doc+total_count_sp
|
|
- _msg = "拟在建生成报警:当天生成的拟在建数量为:%d,其中公告生成:%d,审批项目生成:%d"%(total_count,total_count_doc,total_count_sp)
|
|
|
|
- atAll=False
|
|
|
|
- if total_count==0:
|
|
|
|
- atAll=True
|
|
|
|
- _msg += "\n疑似流程出现问题,请相关负责人尽快处理"
|
|
|
|
- sentMsgToDD(_msg,ACCESS_TOKEN_DATAWORKS,atAll=atAll)
|
|
|
|
- # sendEmail(smtp_host,smtp_username,smtp_password,self.recieviers,_msg)
|
|
|
|
|
|
+ if not (current_hour==0 or current_hour==24):
|
|
|
|
+ _msg = "拟在建生成报警:当天生成的拟在建数量为:%d,其中公告生成:%d,审批项目生成:%d"%(total_count,total_count_doc,total_count_sp)
|
|
|
|
+ atAll=False
|
|
|
|
+ if total_count==0:
|
|
|
|
+ atAll=True
|
|
|
|
+ _msg += "\n疑似流程出现问题,请相关负责人尽快处理"
|
|
|
|
+ sentMsgToDD(_msg,ACCESS_TOKEN_DATAWORKS,atAll=atAll)
|
|
|
|
+ # sendEmail(smtp_host,smtp_username,smtp_password,self.recieviers,_msg)
|
|
|
|
|
|
|
|
|
|
def monitor_sychr(self):
|
|
def monitor_sychr(self):
|