[pbs-devel] [RFC proxmox-backup 2/4] server: pull: factor out group pull task into helper

Christian Ebner c.ebner at proxmox.com
Wed Jul 31 09:38:28 CEST 2024


On 7/30/24 17:56, Gabriel Goller wrote:
> On 25.07.2024 12:19, Christian Ebner wrote:
>>
>> +fn pull_group_task<'future>(
>> +    params: &'future PullParameters,
>> +    group: &'future BackupGroup,
>> +    namespace: &'future BackupNamespace,
>> +    target_namespace: &'future BackupNamespace,
>> +    progress: StoreProgress,
>> +) -> Pin<Box<dyn Future<Output = Result<(StoreProgress, PullStats, 
>> bool), Error>> + Send + 'future>>
> 
> This should be the same as making the function async:
> 
> async fn pull_group_task(...) -> Result<(...), Error> {}
> 
> 
> Just posted these two things on the mailing list so that I don't forget
> it, will follow up with a more detailed review. Will also have a look at
> how we can improve the logging as it's quite janky atm :).

Yes, thanks for the suggestion, makes above declaration much more 
readable and concise.

Also, thanks a lot for the second pair of eyes on the logging, very much 
appreciated!





More information about the pbs-devel mailing list