Merge pull request #798 from jb-alvarado/master
catch error, set is_processing to false on status
This commit is contained in:
commit
3cb0b2cf25
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -1215,7 +1215,7 @@ checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ffplayout"
|
name = "ffplayout"
|
||||||
version = "0.24.0-rc1"
|
version = "0.24.0-rc2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-files",
|
"actix-files",
|
||||||
"actix-multipart",
|
"actix-multipart",
|
||||||
@ -3647,9 +3647,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sysinfo"
|
name = "sysinfo"
|
||||||
version = "0.31.4"
|
version = "0.32.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be"
|
checksum = "e3b5ae3f4f7d64646c46c4cae4e3f01d1c5d255c7406fdd7c7f999a94e488791"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"core-foundation-sys",
|
"core-foundation-sys",
|
||||||
"libc",
|
"libc",
|
||||||
@ -3674,7 +3674,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tests"
|
name = "tests"
|
||||||
version = "0.24.0-rc1"
|
version = "0.24.0-rc2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-rt",
|
"actix-rt",
|
||||||
"actix-test",
|
"actix-test",
|
||||||
|
@ -5,7 +5,7 @@ resolver = "2"
|
|||||||
[workspace.package]
|
[workspace.package]
|
||||||
description = "24/7 playout based on rust and ffmpeg"
|
description = "24/7 playout based on rust and ffmpeg"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
version = "0.24.0-rc1"
|
version = "0.24.0-rc2"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
repository = "https://github.com/ffplayout/ffplayout"
|
repository = "https://github.com/ffplayout/ffplayout"
|
||||||
authors = ["Jonathan Baecker <jonbae77@gmail.com>"]
|
authors = ["Jonathan Baecker <jonbae77@gmail.com>"]
|
||||||
|
@ -55,7 +55,7 @@ serde_json = "1.0"
|
|||||||
serde_with = "3.8"
|
serde_with = "3.8"
|
||||||
shlex = "1.1"
|
shlex = "1.1"
|
||||||
static-files = "0.2"
|
static-files = "0.2"
|
||||||
sysinfo ={ version = "0.31", features = ["linux-netdevs", "linux-tmpfs"] }
|
sysinfo ={ version = "0.32", features = ["linux-netdevs", "linux-tmpfs"] }
|
||||||
sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] }
|
sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] }
|
||||||
time = { version = "0.3", features = ["formatting", "macros"] }
|
time = { version = "0.3", features = ["formatting", "macros"] }
|
||||||
tokio = { version = "1.29", features = ["full"] }
|
tokio = { version = "1.29", features = ["full"] }
|
||||||
|
@ -956,6 +956,8 @@ pub async fn process_control(
|
|||||||
|
|
||||||
match proc.into_inner().command {
|
match proc.into_inner().command {
|
||||||
ProcessCtl::Status => {
|
ProcessCtl::Status => {
|
||||||
|
manager.is_processing.store(false, Ordering::SeqCst);
|
||||||
|
|
||||||
if manager.is_alive.load(Ordering::SeqCst) {
|
if manager.is_alive.load(Ordering::SeqCst) {
|
||||||
return Ok(web::Json("active"));
|
return Ok(web::Json("active"));
|
||||||
} else {
|
} else {
|
||||||
|
@ -183,13 +183,17 @@ async function onSubmitPlayout() {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { ...configStore.contentType, ...authStore.authHeader },
|
headers: { ...configStore.contentType, ...authStore.authHeader },
|
||||||
body: JSON.stringify({ command: 'status' }),
|
body: JSON.stringify({ command: 'status' }),
|
||||||
}).then(async (response: any) => {
|
})
|
||||||
|
.then(async (response: any) => {
|
||||||
if (response === 'active') {
|
if (response === 'active') {
|
||||||
showModal.value = true
|
showModal.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
await configStore.getPlayoutConfig()
|
await configStore.getPlayoutConfig()
|
||||||
})
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
indexStore.msgAlert('error', e.data, 3)
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
indexStore.msgAlert('error', t('config.updatePlayoutFailed'), 2)
|
indexStore.msgAlert('error', t('config.updatePlayoutFailed'), 2)
|
||||||
}
|
}
|
||||||
@ -203,6 +207,8 @@ async function restart(res: boolean) {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { ...configStore.contentType, ...authStore.authHeader },
|
headers: { ...configStore.contentType, ...authStore.authHeader },
|
||||||
body: JSON.stringify({ command: 'restart' }),
|
body: JSON.stringify({ command: 'restart' }),
|
||||||
|
}).catch((e) => {
|
||||||
|
indexStore.msgAlert('error', e.data, 3)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user