Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
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
吴升宇
physical
Commits
cb572e8e
Commit
cb572e8e
authored
Jan 22, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update db_table;
parent
75021676
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
13 deletions
+11
-13
workspace.xml
.idea/workspace.xml
+0
-0
app_conf.xml
app_conf.xml
+5
-1
trans2es_data2es_parallel.py
trans2es/management/commands/trans2es_data2es_parallel.py
+0
-2
contrast_similar.py
trans2es/models/contrast_similar.py
+5
-3
face_user_contrast_similar.py
trans2es/models/face_user_contrast_similar.py
+1
-4
contrast_similar_transfer.py
trans2es/utils/contrast_similar_transfer.py
+0
-3
No files found.
.idea/workspace.xml
View file @
cb572e8e
This diff is collapsed.
Click to expand it.
app_conf.xml
View file @
cb572e8e
...
...
@@ -13,7 +13,11 @@
<element
value=
"search.views.group"
/>
<element
value=
"search.views.user"
/>
<element
value=
"search.views.tag"
/>
<
element
value=
"search.views.contrast_similar"
/
>
<
!--<element value="search.views.contrast_similar"/>--
>
<element
value=
"injection.data_sync.tasks"
/>
</config>
</gm_rpcd_config>
trans2es/management/commands/trans2es_data2es_parallel.py
View file @
cb572e8e
...
...
@@ -104,12 +104,10 @@ class Command(BaseCommand):
def
__sync_data_by_type
(
self
,
type_name
):
try
:
type_info
=
get_type_info_map
()[
type_name
]
logging
.
info
(
"begin .........!:
%
s"
%
type_name
)
query_set
=
type_info
.
queryset
slicer
=
TableSlicer
(
queryset
=
query_set
,
chunk_size
=
type_info
.
bulk_insert_chunk_size
)
logging
.
info
(
"begin .........!:
%
s"
%
slicer
)
for
chunk
in
slicer
.
chunks
():
job
=
Job
(
...
...
trans2es/models/contrast_similar.py
View file @
cb572e8e
...
...
@@ -9,16 +9,18 @@ from django.db import models
import
datetime
from
.topic
import
Topic
manager
=
lambda
:
models
.
Manager
()
.
db_manager
(
using
=
'face'
)
# manager = lambda: models.Manager().db_manager(using='face')
class
ContrastSimilar
(
models
.
Model
):
class
Meta
:
# alisa = 'face'
app_label
:
'face'
verbose_name
=
u"用户脸相似度表"
db_table
=
"face_user_contrast_similar"
objects
=
manager
()
# objects = manager()
id
=
models
.
IntegerField
(
verbose_name
=
"主键ID"
,
primary_key
=
True
)
is_online
=
models
.
BooleanField
(
verbose_name
=
"是否上线"
)
is_deleted
=
models
.
BooleanField
(
verbose_name
=
"是否删除"
)
...
...
trans2es/models/face_user_contrast_similar.py
View file @
cb572e8e
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from
django.conf
import
settings
from
django.core.management.base
import
BaseCommand
,
CommandError
import
traceback
import
logging
from
django.db
import
models
import
datetime
...
...
trans2es/utils/contrast_similar_transfer.py
View file @
cb572e8e
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
os
import
sys
import
logging
import
traceback
from
libs.tools
import
tzlc
import
time
from
trans2es.models.contrast_similar
import
ContrastSimilar
...
...
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