fix: Stop enqueuing document analysis job when only title changes
This commit is contained in:
@@ -1218,27 +1218,6 @@ impl<'a> DocumentsService<'a> {
|
||||
.find(document.current_version_id)
|
||||
.first(conn)?;
|
||||
|
||||
if title_changed {
|
||||
if let Err(err) = enqueue_job(
|
||||
conn,
|
||||
tenant_id,
|
||||
JOB_ANALYZE_DOCUMENT,
|
||||
json!({
|
||||
"document_id": document.id,
|
||||
"document_version_id": current_version.id,
|
||||
"force": false,
|
||||
}),
|
||||
None,
|
||||
) {
|
||||
warn!(
|
||||
document_id = %document.id,
|
||||
version_id = %current_version.id,
|
||||
error = %err,
|
||||
"failed to enqueue analyze job after title change"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
let tags_and_correspondents = load_tags_and_correspondents(conn, &[document_id])?;
|
||||
let version_id = current_version.id;
|
||||
let assets = self.load_asset_responses(conn, tenant_id, version_id, user_id)?;
|
||||
|
||||
Reference in New Issue
Block a user