refactor session management for harvester
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 200
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 5
Description
## User Story
In order to reduce waste of db resources, datagov wants to refactor how db sessions are managed in harvester
## Acceptance Criteria
[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using [BDD](https://en.wikipedia.org/wiki/Behavior-driven_development#Behavioral_specifications).]
- [ ] GIVEN the places where db operations occur (e.g. load manager, flask app, harvester, etc...) \
AND a db session is required to perform those operations
WHEN the refactor happens \
THEN each entity performing db operations manages its own db session and lifecycle \
[AND optionally another verifiable outcome]
## Background
[Any helpful contextual notes or links to artifacts/evidence, if needed]
## Security Considerations ([required](https://nvd.nist.gov/800-53/Rev4/control/CM-4))
[comment]: # "Our SSP says 'The Data.gov team ensures security implications are considered as part of the agile requirements refinement process by including a section in the issue template used as a basis for new work.' so please don't remove this section without care."
[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]
## Sketch
[Notes or a checklist reflecting our understanding of the selected approach]
Contributor guide
Research direction
Start by locating the database operations in the load manager, Flask app, and harvester mentioned in the acceptance criteria, then trace how sessions and their lifecycles are currently handled. Done means each entity performing database operations manages its own session and lifecycle, with the behavior verified across those entry points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100