rclone / rclone

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
https://rclone.org
MIT License
47.19k stars 4.22k forks source link

Feature request: rc api new field `execute_id` on `job/list` #7095

Closed yuudi closed 1 year ago

yuudi commented 1 year ago

The associated forum post URL from https://forum.rclone.org

N/A

What is your current rclone version (output from rclone version)?

rclone v1.62.2

What problem are you are trying to solve?

A GUI frontend display backend jobs

How do you think rclone should be changed to solve that?

Currently we have rc api job/list to list backend jobs, but because user may restart backend or frontend at anytime, frontend cannot track job by job_id because it starts counting from 1 on every restart, so we need a new field to help track the job.

I thinks a new field execute_id would help. It will be generated on every restart and not changed during running. Frontend will know the job_id is no longer used when detect execute_id changes.

I will make a pull request on this later.

How to use GitHub

ncw commented 1 year ago

We could just start with a random number for job id?

yuudi commented 1 year ago

We could just start with a random number for job id?

This seems vague for frontend to check if backend has restarted. Frontend may not want to check if a new job-id is in range (previous, previous + 10000).

So, I think a new field that use random number would be better.

yuudi commented 1 year ago

Thanks for merging #7096