[pbs-devel] [PATCH proxmox-backup v3] api: make prune-group a real workertask
Stefan Lendl
s.lendl at proxmox.com
Tue Apr 2 13:14:39 CEST 2024
"Gabriel Goller" <g.goller at proxmox.com> writes:
> On Tue Mar 12, 2024 at 11:30 AM CET, Stefan Lendl wrote:
>>
>> LGTM with a slight note below for a style preference.
>>
>> > + let prune_group = move |worker: Arc<WorkerTask>| {
>> > + if keep_all {
>> > + task_log!(worker, "No prune selection - keeping all files.");
>> > + } else {
>>
>> You don't actually need to spawn a task if you're not doing any work.
>> On the other hand it makes the code slightly simpler and you need the
>> worker, right?
>
> IMO starting a worker is better, because the user sees that something is
> happening... I mean we could also immediately return and show a popup in
> the frontend, but that won't work when the user isn't logged
> in/currently looking at the page. This way he simply sees a prune job in
> the task log which prints 'No prune selection - keeping all files'.
>
Makes sense!
More information about the pbs-devel
mailing list