To pass started_at field from Job to CachedResponse, I updated JobInfo class so that it stores started_at info too. It is None by default (and set to actual time by Queue._start_newest_job_and_delete_others()). Maybe there is better way to pass this information?
I think alternatively I can get a new timestamp inside worker's Loop.process_next_job and pass it to finish to avoid changing dtos, but I don't know if it's better.
Will close https://github.com/huggingface/dataset-viewer/issues/2892
To pass
started_at
field from Job to CachedResponse, I updatedJobInfo
class so that it storesstarted_at
info too. It is None by default (and set to actual time byQueue._start_newest_job_and_delete_others()
). Maybe there is better way to pass this information? I think alternatively I can get a new timestamp inside worker'sLoop.process_next_job
and pass it tofinish
to avoid changing dtos, but I don't know if it's better.