MCPcopy
hub / github.com/hyperopt/hyperopt / delete

Method delete

hyperopt/mongoexp.py:453–460  ·  view source on GitHub ↗

Delete job[s]

(self, job)

Source from the content-addressed store, hash-verified

451 raise OperationFailure(e)
452
453 def delete(self, job):
454 """Delete job[s]"""
455 try:
456 self.jobs.remove(job)
457 except pymongo.errors.OperationFailure as e:
458 # -- translate pymongo error class into hyperopt error class
459 # see insert() code for rationale.
460 raise OperationFailure(e)
461
462 def delete_all(self, cond=None):
463 """Delete all jobs and attachments"""

Callers 6

delete_allMethod · 0.80
set_attachmentMethod · 0.80
delete_attachmentMethod · 0.80
delete_allMethod · 0.80
__setitem__Method · 0.80
__delitem__Method · 0.80

Calls 1

OperationFailureClass · 0.85

Tested by

no test coverage detected