logs improvements

This commit is contained in:
Ruben Fiszel
2025-11-06 13:04:00 +00:00
parent af6e919765
commit b83eeefd66
3 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
8ab9b8d3cb7486fcb472d34f3a0b49f52548fe8f
44c4865023e6277468a69d866ea1a0b0c84eeb7a
+9 -1
View File
@@ -7023,6 +7023,11 @@ pub fn start_job_update_sse_stream(
// Update log offset if available
if let Some(new_offset) = update.log_offset {
if new_offset != log_offset.unwrap_or(0) {
// let logs = update.new_logs.clone().unwrap_or_default();
// tracing::error!(
// "new_offset: {new_offset}; log_offset: {log_offset:?}; {} {logs}",
// logs.len()
// );
log_offset = Some(new_offset);
} else {
update.log_offset = None;
@@ -7364,7 +7369,10 @@ async fn get_job_update_data(
}
let job = if record.completed.unwrap_or(false) && get_full_job_on_completion {
let get = GetQuery::new().with_auth(&opt_authed).without_logs();
let get = GetQuery::new()
.with_auth(&opt_authed)
.without_logs()
.without_code();
Some(get.fetch(&db, job_id, &w_id).await?)
} else {
None
@@ -156,6 +156,7 @@
lastJobId = jobId
loadedFromObjectStore = ''
LOG_LIMIT = LOG_INC
scroll = true
}
})
let truncatedContent = $derived(truncateContent(content, loadedFromObjectStore, LOG_LIMIT))