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
35c1ab21
Commit
35c1ab21
authored
4 years ago
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
b2246afd
master
litao
mr/develop/xiaohongshu
soyang
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
update_data_in_target_releasers_multi_process_by_date_from_redis.py
...a_in_target_releasers_multi_process_by_date_from_redis.py
+5
-6
No files found.
crawler_sys/framework/update_data_in_target_releasers_multi_process_by_date_from_redis.py
View file @
35c1ab21
...
...
@@ -45,7 +45,6 @@ import threading
# rds_1 = sentinel.master_for('ida_redis_master', socket_timeout=1, db=1, decode_responses=True)
rds_1
=
redis
.
StrictRedis
(
host
=
'172.16.40.164'
,
port
=
6379
,
db
=
19
,
decode_responses
=
True
,
password
=
'ReDis!GmTx*0aN12'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'Specify a platform name.'
)
parser
.
add_argument
(
'-n'
,
'--max_page'
,
default
=
30
,
type
=
int
,
help
=
(
'The max page numbers to be scroll for each releaser url, '
...
...
@@ -262,12 +261,12 @@ if __name__ == "__main__":
platform_str
=
platform
+
"_process"
rds_1
.
set
(
platform_str
,
0
)
for
processe
in
range
(
processes_num
):
start_crawler
(
processe
,
name
)
#
start_crawler(processe,name)
# print(kwargs_dict)
#
future = executor.submit(start_crawler,processe,name)
#
futures.append(future)
#
print('Processe %s start' % processe)
#
executor.shutdown(True)
future
=
executor
.
submit
(
start_crawler
,
processe
,
name
)
futures
.
append
(
future
)
print
(
'Processe
%
s start'
%
processe
)
executor
.
shutdown
(
True
)
# while True:
# now = datetime.datetime.now()
# if now.hour >= exit_hour:
...
...
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