Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
crawler
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
backend
crawler
Commits
5743aa4d
Commit
5743aa4d
authored
4 years ago
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
79cf81ec
mr/develop/xiaohongshu
litao
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
temp_doris_to_redis.py
test/temp_doris_to_redis.py
+3
-2
No files found.
test/temp_doris_to_redis.py
View file @
5743aa4d
...
...
@@ -879,14 +879,15 @@ for city in city_list:
'requests'
:
'[{
\"
request_id
\"
: null,
\"
method
\"
:
\"
doris/search/query_sku
\"
,
\"
params
\"
: {
\"
sort_with_submission
\"
: true,
\"
or_filters
\"
: [],
\"
sort_params
\"
: {
\"
in_whitelist
\"
: 1,
\"
user_city_tag_id
\"
:
%
s,
\"
device_id
\"
:
\"
androidid_ba0799595f555c98
\"
},
\"
sort_type
\"
: 0,
\"
use_tagv3
\"
: false,
\"
filters
\"
: {
\"
tag_ids
\"
: [
%
s]},
\"
offset
\"
: 0,
\"
query
\"
:
\"\"
,
\"
is_sort_with_icon
\"
: true,
\"
user_city_tag_id
\"
:
%
s,
\"
size
\"
: 100},
\"
environment
\"
: {
\"
trace_context
\"
: {
\"
debug
\"
: false,
\"
sampled
\"
: false,
\"
trace_id
\"
:
\"
1abd5ea122024a32827e0a0dd8ad45eb
\"
,
\"
span_id
\"
:
\"
0.2
\"
},
\"
l5d_path
\"
:
\"
/prod/gaia
\"
,
\"
passport
\"
: null,
\"
client_info
\"
: {
\"
log_id
\"
:
\"
gaia.z1l7e4odb43efc0179047f890fc023ba
\"
,
\"
span_id
\"
:
\"
z1l7e4o0ffec82d12944357b60360e80
\"
},
\"
session_id
\"
:
\"
ifop8w1o4spoe969kxd6yh77wzgtsz3c
\"
}}]'
%
(
city_list
[
city
],
query_list
[
query
],
city_list
[
city
])}
print
(
data
)
#
print(data)
response
=
requests
.
post
(
'http://172.16.50.10:8050/v1/batch'
,
headers
=
headers
,
data
=
data
)
data
=
json
.
dumps
(
response
.
json
())
print
(
data
)
#
print(data)
time
.
sleep
(
0.2
)
# dict[query] = data
rds
.
hset
(
redis_key
,
query
,
data
)
print
(
redis_key
,
query
)
# except Exception as e:
# print(e)
# continue
...
...
This diff is collapsed.
Click to expand it.
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