Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Amazon-Selection-Data
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abel_cjy
Amazon-Selection-Data
Commits
b0dd0bb5
Commit
b0dd0bb5
authored
Mar 23, 2026
by
chenyuanjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实时任务修改状态表-增加重试次数
parent
ca8be90a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
templates.py
Pyspark_job/utils/templates.py
+7
-2
No files found.
Pyspark_job/utils/templates.py
View file @
b0dd0bb5
...
...
@@ -673,15 +673,20 @@ class Templates(object):
wx_msg
=
f
"站点: {self.site_name}, {self.date_type}, {self.date_info} asin详情实时消费数据到redis准备工作已完成,可以开启详情爬取!"
else
:
pass
try
:
sql
=
f
"UPDATE selection.workflow_progress SET {kafka_field}=3, updated_at=CURRENT_TIMESTAMP where site_name='{self.site_name}' and date_type='{self.date_type}' and date_info='{self.date_info}' and page='asin详情'"
for
retry
in
range
(
5
):
try
:
DBUtil
.
exec_sql
(
'mysql'
,
'us'
,
sql
)
CommonUtil
.
send_wx_msg
(
wx_users
,
f
"asin详情kafka消费"
,
wx_msg
)
break
except
Exception
as
e
:
print
(
e
,
traceback
.
format_exc
())
print
(
f
"UPDATE workflow_progress 失败(第{retry + 1}次),等待10s重试"
,
e
,
traceback
.
format_exc
())
if
retry
==
4
:
CommonUtil
.
send_wx_msg
(
wx_users
,
f
"
\u26A0
asin详情kafka实时消费
\u26A0
"
,
f
"站点: {self.site_name} asin详情实时消费准备失败,请等待处理!"
)
else
:
time
.
sleep
(
10
)
else
:
pass
def
run_kafka
(
self
):
...
...
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