Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
common_scripy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴升宇
common_scripy
Commits
b4deed76
Commit
b4deed76
authored
Feb 08, 2021
by
王瑞环
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mr/develop/add_adviser_es_monitor' into 'master'
update See merge request
!4
parents
2f2ab6a3
9ee3064c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
adveriser_es_monitor.py
scripies/adveriser_es_monitor.py
+14
-9
No files found.
scripies/adveriser_es_monitor.py
View file @
b4deed76
...
...
@@ -34,7 +34,7 @@ def main():
"query"
:
{
"bool"
:
{
"filter"
:
[
{
"terms"
:
{
"id"
:
doctor_ids
}}]}}}
es_result
=
es
.
search
(
query
)
es_result
=
es
.
search
(
query
,
settings_local
.
ES_INDEX
)
budgetSql
=
"""
select budget, is_open from bdtransfer_prioritybdtransfer
where merchant_id = {}
...
...
@@ -43,7 +43,7 @@ def main():
consumeSql
=
"""
select amount from bdtransfer_bdtransferconsume
where merchant_id = {}
and date =
{}
"""
and date =
'{}'
"""
today
=
str
(
datetime
.
date
.
today
())
num
=
0.0
...
...
@@ -71,23 +71,28 @@ def main():
mysql_is_merchant_priority_send_order
=
budget_res
[
1
]
if
consume_res
:
consume
=
consume_res
[
0
]
mysql_left_consume
=
consume
-
budget
mysql_left_consume
=
budget
-
consume
if
(
int
(
merchant_left_money
)
==
int
(
mysql_merchant_left_money
)
and
int
(
left_consume
)
==
int
(
mysql_left_consume
)
and
int
(
is_merchant_priority_send_order
)
==
int
(
mysql_is_merchant_priority_send_order
)):
pass
else
:
if
(
is_merchant_priority_send_order
==
mysql_is_merchant_priority_send_order
and
is_merchant_priority_send_order
==
False
):
pass
else
:
print
(
"""
doctor_id: {},
merchant_left_money: {}, mysql_merchant_left_money: {},
left_consume: {}, mysql_left_consume:{},
is_merchant_priority_send_order: {},
mysql_is_merchant_priority_send_order:{}"""
.
format
(
doctor_id
,
merchant_left_money
,
mysql_merchant_left_money
,
left_consume
,
mysql_left_consume
,
is_merchant_priority_send_order
,
mysql_is_merchant_priority_send_order
))
if
(
merchant_left_money
==
mysql_merchant_left_money
and
left_consume
==
mysql_left_consume
and
is_merchant_priority_send_order
==
mysql_is_merchant_priority_send_order
):
pass
else
:
num
=
num
+
1
error_doctors
.
append
(
doctor_id
)
print
(
num
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment