Звонки: дольше показывать статус занято; deployServer проверяет sudo -n
This commit is contained in:
parent
c0c29b74ab
commit
e921b06826
@ -1,2 +1,2 @@
|
||||
client.version=1.2.38
|
||||
server.version=1.2.32
|
||||
client.version=1.2.39
|
||||
server.version=1.2.33
|
||||
|
||||
@ -853,8 +853,23 @@ async function finalizeCall(call, {
|
||||
|
||||
call.phase = 'ended';
|
||||
call.statusText = 'Звонок завершён';
|
||||
if (String(localReasonCode || '') === 'busy') {
|
||||
call.statusText = 'Пользователь занят';
|
||||
}
|
||||
notifyCallState();
|
||||
|
||||
const finalHoldMs = String(localReasonCode || '') === 'busy' ? 2600 : 0;
|
||||
if (finalHoldMs > 0) {
|
||||
window.setTimeout(() => {
|
||||
calls.delete(call.callId);
|
||||
if (activeCallId === call.callId) {
|
||||
activeCallId = '';
|
||||
}
|
||||
notifyCallState();
|
||||
}, finalHoldMs);
|
||||
return;
|
||||
}
|
||||
|
||||
calls.delete(call.callId);
|
||||
if (activeCallId === call.callId) {
|
||||
activeCallId = '';
|
||||
|
||||
@ -9,16 +9,18 @@ import java.util.jar.JarFile;
|
||||
public class IT_DeployRestartNoCleanNoTestsMain {
|
||||
|
||||
// ====== НАСТРОЙКИ (можно переопределять systemProperty) ======
|
||||
private static final String REMOTE_HOST = System.getProperty("it.remoteHost", "194.87.0.247");
|
||||
private static final String REMOTE_USER = System.getProperty("it.remoteUser", "user");
|
||||
private static final String REMOTE_HOST = System.getProperty("it.remoteHost", "shineup.me");
|
||||
private static final String REMOTE_USER = System.getProperty("it.remoteUser", "player");
|
||||
|
||||
private static final String REMOTE_DIR = System.getProperty("it.remoteDir", "/home/user/docker/shine-server");
|
||||
private static final String REMOTE_DIR = System.getProperty("it.remoteDir", "/home/player/SHiNE/shine-server");
|
||||
private static final String REMOTE_JAR = REMOTE_DIR + "/shine-server.jar";
|
||||
|
||||
private static final String SERVICE_NAME = System.getProperty("it.service", "shine-server");
|
||||
private static final String LOCAL_JAR = System.getProperty("it.localJar", "build/libs/shine-server.jar");
|
||||
|
||||
public static void main(String[] args) {
|
||||
ensureSudoNoPasswordOrThrow();
|
||||
|
||||
// 1) stop service на сервере
|
||||
sshStrict("sudo systemctl stop " + SERVICE_NAME + " || true");
|
||||
|
||||
@ -40,6 +42,15 @@ public class IT_DeployRestartNoCleanNoTestsMain {
|
||||
System.out.println("deploy_no_clean_no_tests_done");
|
||||
}
|
||||
|
||||
private static void ensureSudoNoPasswordOrThrow() {
|
||||
int code = ssh("sudo -n true");
|
||||
if (code == 0) return;
|
||||
throw new RuntimeException(
|
||||
"Remote sudo requires password for " + REMOTE_USER + "@" + REMOTE_HOST
|
||||
+ ". Configure NOPASSWD for service control or run deploy with privileged user."
|
||||
);
|
||||
}
|
||||
|
||||
private static void waitRemotePort7070() {
|
||||
for (int i = 0; i < 50; i++) {
|
||||
int code = ssh("ss -ltnp | grep -q ':7070'");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user