mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
fix an issue with upload status identification
This commit is contained in:
parent
24313fe001
commit
68a9dd7e05
@ -43,10 +43,10 @@ export class FileStatus {
|
|||||||
updateProgress(status: FileStatusPhase, currentProgress?: number, maxProgress?: number) {
|
updateProgress(status: FileStatusPhase, currentProgress?: number, maxProgress?: number) {
|
||||||
if (status >= this.phase) {
|
if (status >= this.phase) {
|
||||||
this.phase = status
|
this.phase = status
|
||||||
if (currentProgress != undefined) {
|
if (currentProgress != null) {
|
||||||
this.currentPhaseProgress = currentProgress
|
this.currentPhaseProgress = currentProgress
|
||||||
}
|
}
|
||||||
if (maxProgress) {
|
if (maxProgress != null) {
|
||||||
this.currentPhaseMaxProgress = maxProgress
|
this.currentPhaseMaxProgress = maxProgress
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ export class ConsumerStatusService {
|
|||||||
private documentConsumptionFailedSubject = new Subject<FileStatus>()
|
private documentConsumptionFailedSubject = new Subject<FileStatus>()
|
||||||
|
|
||||||
private get(taskId: string, filename?: string) {
|
private get(taskId: string, filename?: string) {
|
||||||
let status = this.consumerStatus.find(e => e.taskId == taskId) || this.consumerStatus.find(e => e.filename == filename)
|
let status = this.consumerStatus.find(e => e.taskId == taskId) || this.consumerStatus.find(e => e.filename == filename && e.taskId == null)
|
||||||
if (!status) {
|
if (!status) {
|
||||||
status = new FileStatus()
|
status = new FileStatus()
|
||||||
this.consumerStatus.push(status)
|
this.consumerStatus.push(status)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user