Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
jd_data_process
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
c725bd76
authored
Oct 28, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add helper.py
parent
30aec8af
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
helper.py
helper.py
View file @
c725bd76
...
...
@@ -6,6 +6,36 @@ import pymysql
import
redis
import
json
config_dev
=
{
"mysql"
:
{
"host"
:
"192.168.1.238"
,
"port"
:
3306
,
"user"
:
"liexin_data_distribution"
,
"password"
:
"liexin_data_distribution#zsyM"
,
"database"
:
"liexin_data_distribution"
},
"redis"
:
{
"host"
:
"192.168.1.235"
,
"port"
:
6379
,
"password"
:
"icDb29mLy2s"
}
}
config_prod
=
{
"mysql"
:
{
"host"
:
"bigdata2.ichunt.db"
,
"port"
:
3306
,
"user"
:
"DsbuUx"
,
"password"
:
"sfj09JjsfpQx0"
,
"database"
:
"liexin_data_distribution"
},
"redis"
:
{
"host"
:
"172.18.137.38"
,
"port"
:
6379
,
"password"
:
"icDb29mLy2s"
}
}
def
update_vc_ext_redis
(
conf
:
dict
):
"""
更新redis中的拓展参数
...
...
@@ -60,3 +90,8 @@ def update_vc_ext_redis(conf: dict):
value
=
json
.
dumps
(
attr_ids
,
ensure_ascii
=
False
)
redis_db
.
hset
(
name
=
"jd_ext_attr"
,
key
=
key
,
value
=
value
)
print
(
"jd_ext_attr"
,
key
,
value
)
if
__name__
==
'__main__'
:
config
=
config_prod
update_vc_ext_redis
(
config
)
print
(
"======================> redis中拓展参数更新完毕!"
)
\ No newline at end of file
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