Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
chip1stop_cate
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b63a737d
authored
Apr 03, 2019
by
lichenggang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
'update redis num'
parent
fb758393
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
goods.py
mysqlopera.py
goods.py
View file @
b63a737d
...
@@ -144,7 +144,7 @@ def get_url():
...
@@ -144,7 +144,7 @@ def get_url():
pool
=
redis
.
ConnectionPool
(
**
get_redis_conf
())
pool
=
redis
.
ConnectionPool
(
**
get_redis_conf
())
r
=
redis
.
Redis
(
connection_pool
=
pool
)
r
=
redis
.
Redis
(
connection_pool
=
pool
)
for
_
in
range
(
30
0
):
for
_
in
range
(
26
0
):
cate_url
=
r
.
lpop
(
'csc_elec_chip1stop_1'
)
cate_url
=
r
.
lpop
(
'csc_elec_chip1stop_1'
)
if
cate_url
:
if
cate_url
:
...
...
mysqlopera.py
View file @
b63a737d
...
@@ -568,7 +568,14 @@ class MySqlOperator(object):
...
@@ -568,7 +568,14 @@ class MySqlOperator(object):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# pass
# pass
d
=
MySqlOperator
(
'szlc'
)
d
=
MySqlOperator
(
'chip1stop'
)
with
d
.
db
.
cursor
()
as
cursor
:
sql
=
"SELECT goods_id FROM lie_goods WHERE goods_name=
%
s and goods_name_style=
%
s"
cursor
.
execute
(
sql
,
(
'AD976AR'
,
'AD01-0000139'
))
result
=
cursor
.
fetchone
()
result
=
result
[
0
]
if
result
else
None
print
(
result
)
# print(d.get_ext_id_by_goods_id_attr_name(18000500790, 'Product Category'))
# print(d.get_ext_id_by_goods_id_attr_name(18000500790, 'Product Category'))
# data = (('SO180219037', '蔡**', '19**62A', 1519055525, '2018-02-19 23:52:05', 100, '已付3', '好好', '待取货3', 1519055525,
# data = (('SO180219037', '蔡**', '19**62A', 1519055525, '2018-02-19 23:52:05', 100, '已付3', '好好', '待取货3', 1519055525,
# 2519055525),
# 2519055525),
...
...
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