Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
inspect_report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhengjinlei
inspect_report
Commits
7005f31e
Commit
7005f31e
authored
May 14, 2020
by
lvshibao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改定时任务时间
parent
36e70fd9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
cron.py
src/inspect_report/cron.py
+6
-6
No files found.
src/inspect_report/cron.py
View file @
7005f31e
...
@@ -33,7 +33,7 @@ def team_seat():
...
@@ -33,7 +33,7 @@ def team_seat():
return
seat_code_team_name
return
seat_code_team_name
@
kronos
.
register
(
'30 1,
8
,12 * * *'
)
@
kronos
.
register
(
'30 1,
6
,12 * * *'
)
def
rule_stat
(
start_date
=
None
,
end_date
=
None
):
def
rule_stat
(
start_date
=
None
,
end_date
=
None
):
"""
"""
首页概述-违规项统计
首页概述-违规项统计
...
@@ -42,7 +42,7 @@ def rule_stat(start_date=None, end_date=None):
...
@@ -42,7 +42,7 @@ def rule_stat(start_date=None, end_date=None):
seat_code_team_name
=
team_seat
()
seat_code_team_name
=
team_seat
()
if
not
start_date
and
not
end_date
:
if
not
start_date
and
not
end_date
:
start_date
=
(
datetime
.
now
()
+
timedelta
(
days
=-
1
))
.
strftime
(
'
%
Y-
%
m-
%
d'
)
start_date
=
(
datetime
.
now
()
+
timedelta
(
days
=-
1
))
.
strftime
(
'
%
Y-
%
m-
%
d'
)
end_date
=
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
end_date
=
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S
'
)
logger
.
info
(
'[rule_stat]rule stat start...'
)
logger
.
info
(
'[rule_stat]rule stat start...'
)
task_condition
=
{
'hasCheck'
:
1
,
'createdAt__gte'
:
start_date
,
'createdAt__lt'
:
end_date
}
task_condition
=
{
'hasCheck'
:
1
,
'createdAt__gte'
:
start_date
,
'createdAt__lt'
:
end_date
}
tasks
=
Tasks
.
objects
.
filter
(
**
task_condition
)
.
values
(
'id'
,
'name'
,
'sessionCollectionId'
)
tasks
=
Tasks
.
objects
.
filter
(
**
task_condition
)
.
values
(
'id'
,
'name'
,
'sessionCollectionId'
)
...
@@ -80,7 +80,7 @@ def rule_stat(start_date=None, end_date=None):
...
@@ -80,7 +80,7 @@ def rule_stat(start_date=None, end_date=None):
logger
.
info
(
'[rule_stat]rule stat end.'
)
logger
.
info
(
'[rule_stat]rule stat end.'
)
@
kronos
.
register
(
'30 1,
8
,12 * * *'
)
@
kronos
.
register
(
'30 1,
6
,12 * * *'
)
def
seat_stat
(
start_date
=
None
,
end_date
=
None
):
def
seat_stat
(
start_date
=
None
,
end_date
=
None
):
"""
"""
首页概述-违规坐席统计
首页概述-违规坐席统计
...
@@ -89,7 +89,7 @@ def seat_stat(start_date=None, end_date=None):
...
@@ -89,7 +89,7 @@ def seat_stat(start_date=None, end_date=None):
seat_code_team_name
=
team_seat
()
seat_code_team_name
=
team_seat
()
if
not
start_date
and
not
end_date
:
if
not
start_date
and
not
end_date
:
start_date
=
(
datetime
.
now
()
+
timedelta
(
days
=-
1
))
.
strftime
(
'
%
Y-
%
m-
%
d'
)
start_date
=
(
datetime
.
now
()
+
timedelta
(
days
=-
1
))
.
strftime
(
'
%
Y-
%
m-
%
d'
)
end_date
=
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
end_date
=
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S
'
)
logger
.
info
(
'[seat_stat]violate seat stat start...'
)
logger
.
info
(
'[seat_stat]violate seat stat start...'
)
task_condition
=
{
'hasCheck'
:
1
,
'createdAt__gte'
:
start_date
,
'createdAt__lt'
:
end_date
}
task_condition
=
{
'hasCheck'
:
1
,
'createdAt__gte'
:
start_date
,
'createdAt__lt'
:
end_date
}
tasks
=
Tasks
.
objects
.
filter
(
**
task_condition
)
.
values
(
'id'
,
'name'
,
'sessionCollectionId'
)
tasks
=
Tasks
.
objects
.
filter
(
**
task_condition
)
.
values
(
'id'
,
'name'
,
'sessionCollectionId'
)
...
@@ -128,7 +128,7 @@ def seat_stat(start_date=None, end_date=None):
...
@@ -128,7 +128,7 @@ def seat_stat(start_date=None, end_date=None):
logger
.
info
(
'[seat_stat]violate seat stat end.'
)
logger
.
info
(
'[seat_stat]violate seat stat end.'
)
@
kronos
.
register
(
'30 1,
8
,12 * * *'
)
@
kronos
.
register
(
'30 1,
6
,12 * * *'
)
def
score_stat
(
start_date
=
None
,
end_date
=
None
):
def
score_stat
(
start_date
=
None
,
end_date
=
None
):
"""
"""
坐席得分统计
坐席得分统计
...
@@ -137,7 +137,7 @@ def score_stat(start_date=None, end_date=None):
...
@@ -137,7 +137,7 @@ def score_stat(start_date=None, end_date=None):
seat_code_team_name
=
team_seat
()
seat_code_team_name
=
team_seat
()
if
not
start_date
and
not
end_date
:
if
not
start_date
and
not
end_date
:
start_date
=
(
datetime
.
now
()
+
timedelta
(
days
=-
1
))
.
strftime
(
'
%
Y-
%
m-
%
d'
)
start_date
=
(
datetime
.
now
()
+
timedelta
(
days
=-
1
))
.
strftime
(
'
%
Y-
%
m-
%
d'
)
end_date
=
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
end_date
=
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S
'
)
logger
.
info
(
'[score_stat]seat score stat start...'
)
logger
.
info
(
'[score_stat]seat score stat start...'
)
task_condition
=
{
'hasCheck'
:
1
,
'createdAt__gte'
:
start_date
,
'createdAt__lt'
:
end_date
}
task_condition
=
{
'hasCheck'
:
1
,
'createdAt__gte'
:
start_date
,
'createdAt__lt'
:
end_date
}
tasks
=
Tasks
.
objects
.
filter
(
**
task_condition
)
.
values
(
'id'
,
'name'
,
'sessionCollectionId'
)
tasks
=
Tasks
.
objects
.
filter
(
**
task_condition
)
.
values
(
'id'
,
'name'
,
'sessionCollectionId'
)
...
...
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