Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wfs_export
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yexing
wfs_export
Commits
29539169
Commit
29539169
authored
Jan 05, 2026
by
yexing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新代理IP
parent
8ca54d41
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
src/walmart_sup.py
+9
-3
No files found.
src/walmart_sup.py
View file @
29539169
...
...
@@ -13,6 +13,7 @@ if not IS_DEBUG:
logger
.
remove
()
logger
.
add
(
LOG_PATH
,
level
=
"INFO"
,
rotation
=
"1 day"
,
retention
=
"1 months"
)
class
Subsidiary
:
def
__init__
(
self
):
self
.
_tasks
=
[]
...
...
@@ -21,7 +22,12 @@ class Subsidiary:
async
def
connect
(
self
):
if
self
.
r
is
None
:
self
.
r
=
redis
.
Redis
(
host
=
"localhost"
,
port
=
6380
,
db
=
0
)
self
.
r
=
redis
.
Redis
(
host
=
"localhost"
,
port
=
int
(
os
.
getenv
(
"REDIS_HOST"
,
6380
)),
password
=
os
.
getenv
(
"REDIS_PASSWORD"
),
db
=
0
,
)
if
await
self
.
r
.
ping
():
logger
.
info
(
"redis 连接成功"
)
...
...
@@ -56,8 +62,7 @@ class Subsidiary:
logger
.
info
(
"资源已回收"
)
async
def
run_during_night
(
self
):
"""在晚上运行任务
"""
"""在晚上运行任务"""
while
True
:
now
=
datetime
.
now
()
.
time
()
if
time
(
22
,
0
)
>
now
and
now
>
time
(
7
,
0
):
...
...
@@ -86,6 +91,7 @@ class Subsidiary:
finally
:
await
self
.
close
()
if
__name__
==
"__main__"
:
loop
=
asyncio
.
get_event_loop
()
if
IS_DEBUG
:
...
...
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