Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
graces_es6
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
rank
graces_es6
Commits
2e956207
Commit
2e956207
authored
Nov 03, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新es的配置
parent
b7b9b9c4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
+2
-3
tasks.py
injection/data_sync/tasks.py
+2
-1
diary.py
talos/models/diary/diary.py
+0
-1
type_info.py
trans2es/type_info.py
+0
-1
No files found.
injection/data_sync/tasks.py
View file @
2e956207
...
...
@@ -8,13 +8,14 @@ from social.models import UserFollow
from
trans2es.type_info
import
get_type_info_map
from
gaia.routers
import
thread_local
from
rpc.all
import
get_rpc_remote_invoker
from
search.utils.es
import
get_talos_es7_service
@shared_task
@thread_local
(
DB_FOR_READ_OVERRIDE
=
settings
.
DBMW_SLAVE_DB_NAME
)
def
write_to_es
(
es_type
,
pk_list
,
configuration
,
use_batch_query_set
=
False
,
es_config
=
None
):
if
es_type
in
[
"service"
,
'sku'
]:
es_config
=
False
es_config
=
[
get_talos_es7_service
]
pk_list
=
list
(
frozenset
(
pk_list
))
type_info_map
=
get_type_info_map
()
...
...
talos/models/diary/diary.py
View file @
2e956207
...
...
@@ -347,7 +347,6 @@ class Diary(models.Model):
def
get_update_time_stratific
(
self
,
create_time
):
try
:
now
=
datetime
.
datetime
.
now
()
d2
=
datetime
.
datetime
.
strptime
(
now
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
),
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
delta_30
=
datetime
.
timedelta
(
days
=
30
)
...
...
trans2es/type_info.py
View file @
2e956207
...
...
@@ -62,7 +62,6 @@ def get_talos_es6_instance():
def
get_es_list_by_type
(
es_type
,
es_config
=
None
):
if
es_type
in
[
'service'
,
'sku'
]:
if
es_config
==
True
:
es_list
=
[
get_talos_es6_instance
()]
else
:
...
...
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