File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/lock Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -172,8 +172,9 @@ public static void deleteLock(String flowEditLock) throws DSSErrorException {
172
172
try {
173
173
if (StringUtils .isNotBlank (flowEditLock )) {
174
174
DSSFlowEditLock dssFlowEditLock = lockMapper .getFlowEditLockByLockContent (flowEditLock );
175
- Long flowId = Optional .ofNullable (dssFlowEditLock ).map (DSSFlowEditLock ::getFlowID ).get ();
176
- lockMapper .clearExpire (sdf .get ().format (new Date (System .currentTimeMillis () - DSSWorkFlowConstant .DSS_FLOW_EDIT_LOCK_TIMEOUT .getValue ())), flowId );
175
+ if (dssFlowEditLock != null ) {
176
+ lockMapper .clearExpire (sdf .get ().format (new Date (System .currentTimeMillis () - DSSWorkFlowConstant .DSS_FLOW_EDIT_LOCK_TIMEOUT .getValue ())), dssFlowEditLock .getFlowID ());
177
+ }
177
178
}
178
179
} catch (Exception e ) {
179
180
LOGGER .error ("flowEditLock delete failed,flowId:{}" , flowEditLock , e );
Original file line number Diff line number Diff line change @@ -87,20 +87,25 @@ function startDssProject(){
87
87
startApp
88
88
sleep 15
89
89
90
- echo " ------------------------Start check whether the project service is registered to eureka successfully-----------------------------"
90
+ echo " ------------------------Start to check whether the project service is registered to eureka successfully-----------------------------"
91
91
# project服务启动并注册到eureka后再启动其他服务
92
- while [[ -z $result ]]
92
+ i=1
93
+ while [[ -z $result ]] && [[ $i -le 24 ]]
93
94
do
94
95
sleep 5
95
- if [ -z $EUREKA_USERNAME ] || [ -z $EUREKA_PASSWORD ];
96
- then
96
+ if [ -z $EUREKA_USERNAME ] || [ -z $EUREKA_PASSWORD ]; then
97
97
response=` curl http://${EUREKA_INSTALL_IP} :${EUREKA_PORT} /eureka/apps/DSS-FRAMEWORK-PROJECT-SERVER`
98
- else
98
+ else
99
99
response=` curl http://${EUREKA_USENAME} :${EUREKA_PASSWORD} @${EUREKA_INSTALL_IP} :${EUREKA_PORT} /eureka/apps/DSS-FRAMEWORK-PROJECT-SERVER`
100
100
fi
101
+ let i++
101
102
result=$( echo $response | grep ' DSS-FRAMEWORK-PROJECT-SERVER' )
102
103
done
103
- echo " ------------------------the project service is registered to eureka successfully------------------------------------------------"
104
+ if [[ $i -eq 25 ]]; then
105
+ echo " the project server start failed in two minutes,please check the log to find more error details."
106
+ exit
107
+ fi
108
+ echo " ------------------------the project service is registered to eureka successfully------------------------------------------------"
104
109
105
110
SERVER_NAME=dss-framework-orchestrator-server
106
111
SERVER_IP=$DSS_FRAMEWORK_ORCHESTRATOR_SERVER_INSTALL_IP
You can’t perform that action at this time.
0 commit comments