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
2a3ff0e2
Commit
2a3ff0e2
authored
4 years ago
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e32b3889
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
update_data_in_target_releasers_multi_process_by_date_from_redis.py
...a_in_target_releasers_multi_process_by_date_from_redis.py
+3
-5
No files found.
crawler_sys/framework/update_data_in_target_releasers_multi_process_by_date_from_redis.py
View file @
2a3ff0e2
...
...
@@ -59,11 +59,11 @@ parser.add_argument('-index', '--es_index', default='crawler-data-raw', type=str
help
=
(
'assign a es_index to write into, default to crawler-data-raw'
))
parser
.
add_argument
(
'-g'
,
'--output_to_es_register'
,
default
=
'True'
,
type
=
str
,
help
=
(
'Write data into es or not, default to True'
))
parser
.
add_argument
(
'-processes'
,
'--processes_num'
,
default
=
1
,
type
=
int
,
parser
.
add_argument
(
'-processes'
,
'--processes_num'
,
default
=
2
,
type
=
int
,
help
=
(
'Processes number to be used in multiprocessing'
))
parser
.
add_argument
(
'-exit_hour'
,
'--exit_hour'
,
default
=
22
,
type
=
int
,
help
=
(
'Processes number to be used in multiprocessing'
))
parser
.
add_argument
(
'-thead'
,
'--thead_num'
,
default
=
1
,
type
=
int
,
parser
.
add_argument
(
'-thead'
,
'--thead_num'
,
default
=
2
,
type
=
int
,
help
=
(
'thead_num number to be used in multiprocessing'
))
parser
.
add_argument
(
'-v'
,
'--video'
,
default
=
"False"
,
type
=
str
,
help
=
(
'Is or not run video_page_crawler'
))
...
...
@@ -123,7 +123,6 @@ output_to_es_register = parse_bool_for_args(args.output_to_es_register)
processes_num
=
args
.
processes_num
name
=
args
.
name
lock
=
threading
.
Lock
()
es_index
=
args
.
es_index
end_time
=
int
(
datetime
.
datetime
.
now
()
.
timestamp
()
*
1e3
)
...
...
@@ -182,8 +181,7 @@ def get_task_from_redis():
def
single_thead
(
processe
,
name
):
allow
=
10
data_list
=
[]
rds_1
=
redis
.
StrictRedis
(
host
=
'172.16.40.164'
,
port
=
6379
,
db
=
19
,
decode_responses
=
True
,
password
=
'ReDis!GmTx*0aN12'
)
while
True
:
import
pdb
pdb
.
set_trace
()
...
...
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