Skip to content

Commit

Permalink
fix: 调整sqlserver的job超时时间 TencentBlueKing#7584
Browse files Browse the repository at this point in the history
  • Loading branch information
yksitu committed Oct 25, 2024
1 parent 2278686 commit e3beab0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def sync_dbs_for_cluster_sub_flow(
ExecActuatorKwargs(
exec_ips=[Host(ip=master_instance.machine.ip, bk_cloud_id=cluster.bk_cloud_id)],
get_payload_func=SqlserverActPayload.get_backup_dbs_payload.__name__,
job_timeout=3 * 3600,
job_timeout=24 * 3600,
custom_params={
"port": master_instance.port,
"file_tag": SqlserverBackupFileTagEnum.DBFILE1M.value,
Expand All @@ -534,7 +534,7 @@ def sync_dbs_for_cluster_sub_flow(
ExecActuatorKwargs(
exec_ips=[Host(ip=master_instance.machine.ip, bk_cloud_id=cluster.bk_cloud_id)],
get_payload_func=SqlserverActPayload.get_backup_dbs_payload.__name__,
job_timeout=3 * 3600,
job_timeout=24 * 3600,
custom_params={
"port": master_instance.port,
"file_tag": SqlserverBackupFileTagEnum.INCREMENT_BACKUP.value,
Expand Down Expand Up @@ -571,7 +571,7 @@ def sync_dbs_for_cluster_sub_flow(
restore_mode=SqlserverRestoreMode.FULL.value,
exec_ips=[slave],
port=master_instance.port,
job_timeout=3 * 3600,
job_timeout=24 * 3600,
)
),
}
Expand All @@ -592,7 +592,7 @@ def sync_dbs_for_cluster_sub_flow(
restore_mode=SqlserverRestoreMode.LOG.value,
exec_ips=[slave],
port=master_instance.port,
job_timeout=3 * 3600,
job_timeout=24 * 3600,
)
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def run_flow(self):
ExecActuatorKwargs(
exec_ips=[Host(ip=master_instance.machine.ip, bk_cloud_id=cluster.bk_cloud_id)],
get_payload_func=SqlserverActPayload.get_backup_dbs_payload.__name__,
job_timeout=3 * 3600,
job_timeout=24 * 3600,
custom_params={
"port": master_instance.port,
"file_tag": sub_flow_context["file_tag"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def full_dts_flow(self):
ExecActuatorKwargs(
exec_ips=[Host(ip=master_instance.machine.ip, bk_cloud_id=cluster.bk_cloud_id)],
get_payload_func=SqlserverActPayload.get_backup_dbs_payload.__name__,
job_timeout=3 * 3600,
job_timeout=24 * 3600,
custom_params={
"port": master_instance.port,
"file_tag": SqlserverBackupFileTagEnum.DBFILE1M.value,
Expand All @@ -167,7 +167,7 @@ def full_dts_flow(self):
ExecActuatorKwargs(
exec_ips=[Host(ip=master_instance.machine.ip, bk_cloud_id=cluster.bk_cloud_id)],
get_payload_func=SqlserverActPayload.get_backup_dbs_payload.__name__,
job_timeout=3 * 3600,
job_timeout=24 * 3600,
custom_params={
"port": master_instance.port,
"file_tag": SqlserverBackupFileTagEnum.INCREMENT_BACKUP.value,
Expand Down Expand Up @@ -206,7 +206,7 @@ def full_dts_flow(self):
restore_db_status=SqlserverRestoreDBStatus.NORECOVERY.value,
exec_ips=[Host(ip=target_master_instance.machine.ip, bk_cloud_id=target_cluster.bk_cloud_id)],
port=target_master_instance.port,
job_timeout=3 * 3600,
job_timeout=24 * 3600,
)
),
)
Expand All @@ -229,7 +229,7 @@ def full_dts_flow(self):
restore_db_status=restore_db_status,
exec_ips=[Host(ip=target_master_instance.machine.ip, bk_cloud_id=target_cluster.bk_cloud_id)],
port=target_master_instance.port,
job_timeout=3 * 3600,
job_timeout=24 * 3600,
)
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ def _execute(self, data, parent_data) -> bool:
"file_type": MediumFileTypeEnum.Repo.value,
"file_source_code": env.APP_CODE,
}
# 文件传输设置24小时超时
payload = {
"bk_biz_id": env.JOB_BLUEKING_BIZ_ID,
"file_target_path": kwargs["file_target_path"],
"transfer_mode": 2,
"timeout": 24 * 3600,
"file_source_list": [file_source],
"account_alias": "system",
"target_server": {"ip_list": target_hosts},
Expand Down

0 comments on commit e3beab0

Please sign in to comment.