Page MenuHomeSoftware Heritage

Postgres storage: introduce a db() context manager
ClosedPublic

Authored by olasd on Wed, Oct 2, 5:24 PM.

Details

Summary

This helper avoids us repeating the get_db/put_db pattern all the time.

Depends on D2064 because CI is broken without it

Test Plan

no functional change

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd created this revision.Wed, Oct 2, 5:24 PM
anlambert accepted this revision.Wed, Oct 2, 5:53 PM
This revision is now accepted and ready to land.Wed, Oct 2, 5:53 PM
This revision was automatically updated to reflect the committed changes.