Page MenuHomeSoftware Heritage

Vault: add batches
ClosedPublic

Authored by seirl on Apr 24 2018, 3:42 PM.

Diff Detail

Repository
rDVAU Software Heritage Vault
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1199
Build 1543: arc lint + arc unit

Event Timeline

concurrently+index names

  • Add batch functions and endpoints
seirl retitled this revision from sql schema: add batches and various indexes to Vault: add batches.Apr 24 2018, 6:37 PM
seirl added reviewers: Reviewers, olasd, moranegg.
seirl added a project: Vault.

The response of batch_progress looks like this:

In [51]: c.batch_progress(4)
Out[51]: 
{'bundles': [{'id': 3,
   'obj_id': '7d4aecffc20478ea6807b9649b25b71e22ebbcb6',
   'obj_type': 'revision_gitfast',
   'progress_message': None,
   'status': 'done'},
  {'id': 4,
   'obj_id': '355873d2daf160b736409a359da9e9ca4d714570',
   'obj_type': 'revision_gitfast',
   'progress_message': None,
   'status': 'done'},
  {'id': 5,
   'obj_id': '612dd81b51a443a19e6a2c17f67ef46ea4c2c123',
   'obj_type': 'revision_gitfast',
   'progress_message': None,
   'status': 'done'}],
 'done': 3,
 'failed': 0,
 'new': 0,
 'pending': 0,
 'total': 3}
In D306#6243, @seirl wrote:

The response of batch_progress looks like this:

In [51]: c.batch_progress(4)
Out[51]: 
{'bundles': [{'id': 3,
   'obj_id': '7d4aecffc20478ea6807b9649b25b71e22ebbcb6',
   'obj_type': 'revision_gitfast',
   'progress_message': None,
   'status': 'done'},
  {'id': 4,
   'obj_id': '355873d2daf160b736409a359da9e9ca4d714570',
   'obj_type': 'revision_gitfast',
   'progress_message': None,
   'status': 'done'},
  {'id': 5,
   'obj_id': '612dd81b51a443a19e6a2c17f67ef46ea4c2c123',
   'obj_type': 'revision_gitfast',
   'progress_message': None,
   'status': 'done'}],
 'done': 3,
 'failed': 0,
 'new': 0,
 'pending': 0,
 'total': 3}

I like the response, it is very clear and all the data needed is returned.
I see that batch_info is also getting the time-stamps and may provide information about the cooking execution time,
I don't know if we should add it to the response or use it only internally.
But I'm happy with either way :-)

This revision was not accepted when it landed; it landed in state Needs Review.Apr 25 2018, 3:52 PM
This revision was automatically updated to reflect the committed changes.