Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doudian-py
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
baiquan
doudian-py
Commits
c402c089
Commit
c402c089
authored
Jun 20, 2025
by
baiquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新task_worker
parent
45f7bdd1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
task_worker.py
+11
-2
No files found.
task_worker.py
View file @
c402c089
import
asyncio
import
json
import
os
from
urllib.parse
import
urlencode
from
urllib.parse
import
urlencode
import
execjs
import
execjs
from
celery
import
shared_task
from
celery
import
shared_task
from
errors
import
*
from
errors
import
AppError
from
hub_
import
*
from
hub_
import
closeBrowser
from
login
import
login
from
login
import
login
from
main
import
syncShop
,
syncShopInfo
,
createTemplate
from
main
import
syncShop
,
syncShopInfo
,
createTemplate
from
upload_video
import
upload_video
from
upload_video
import
upload_video
from
loguru
import
logger
# 创建 logs 目录(如果不存在)
os
.
makedirs
(
"logs"
,
exist_ok
=
True
)
# 添加日志文件输出,按7天滚动
logger
.
add
(
"logs/api.log"
,
rotation
=
"7 day"
,
level
=
"INFO"
,
encoding
=
"utf-8"
,
backtrace
=
True
,
diagnose
=
True
)
@shared_task
(
name
=
'sync_shop'
)
@shared_task
(
name
=
'sync_shop'
)
def
execute_sync_shop
(
container_name
:
str
):
def
execute_sync_shop
(
container_name
:
str
):
...
...
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