[pbs-devel] applied: [PATCH proxmox-backup] fix #4895: jobs: ignore task log not found error

Gabriel Goller g.goller at proxmox.com
Thu Sep 28 09:32:28 CEST 2023

On 9/27/23 17:41, Thomas Lamprecht wrote:

> [..]
> applied, thanks!
> IMO it might be worth doing this more centrally, e.g., catch a ENOENT in
> the upid_read_status's `File::open(path)` call and return either
> `TaskState::Unknown { endtime: upid.startime }`, which is also the
> default of upid_read_status on other (parsing) errors, or add a new
> `TaskState::NotFound` state to differ between a unknown result and this
> situation, and make it more likely that call-sites handle this
> explicitly.
> What do you think?

Could make sense because we do quite often:
upid_read_status(&info.upid).unwrap_or(TaskState::Unknown { endtime: now });
The problem is that we use different endtimes (mostly either 0 or 'now') 
on every
call. So we would have to convert this to a match statement matching 
and changing the endtime AFAICT.

More information about the pbs-devel mailing list