Skip to content

Add WorkerActivity start time and average/min/max processing time

Erwan Rouchet requested to merge workeractivity-timing into master

Refs #1394 (closed)

  • A new WorkerActivity.started DateTime field is introduced.
  • started is set to the existing updated DateTime for WorkerActivities that are Started at the time of the migration.
  • A constraint ensures that we always set started when trying to update the activity to a started state.
  • The complex QuerySet to retrieve the WorkerActivity statistics has been deduplicated from the CorpusWorkersActivity and ProcessWorkerActivity endpoints.
  • ActivityManager.bulk_insert no longer accepts a state argument. queued was the only state that was actually used, and handling setting the start time when using state=started would have been a mess with the raw SQL query as well as completely useless, so I just removed the ability to create activities as started.

Merge request reports

Loading