Call-for-Code-for-Racial-Justice / Legit-Info

"Legit Info" app helps residents understand the impact of legislation and policies based on their country, state, county, city, district location
Apache License 2.0
67 stars 74 forks source link

Create new database table to track job status #127

Closed tonypearson closed 2 years ago

tonypearson commented 3 years ago

Background on the problem the feature will solve/improved user experience

There are three weekly jobs that maintain the database to the latest levels of legislation for United States and the associated States.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] These jobs have not run since June! Nobody knows why, and when they do run, nobody knows how much they processed.

Describe the solution you'd like

a) Create a new table, it would contain these five values: Job Name, Region, Job Start Time (date/time stamp), Job End Time (date/time stamp), # of objects processed successfully, # of errors encountered.

b) In each of the three jobs, insert a new record with its job name, state, start/stop times, number of objects processed, and number of errors encountered. For "get_datasets" the number of objects would be the number of data sets downloaded and stored in FOB storage. For "extract_files" and "analyze_text" the number of objects would represent the number of laws.

The "region" would be AZ, OH, etc. for each state, and "US" for Federal, etc.

If you run each of the three jobs weekly, and have four regions (AZ, OH, GA and US), then you should have 3x4 or 12 new rows every week. If the database table gets too big, we can cull after so many months of activity.

A clear and concise description of what you want to happen. New database defined, and the three python jobs modified to insert new records into this table. The table can be reviewed in the Admin panels, or we can create a new report/display/email as a separate issue.

Tasks

Description of the development tasks needed to complete this issue, including tests,

Acceptance Criteria

Standards we believe this issue must reach to be considered complete and ready for a pull request. E.g precisely all the user should be able to do with this update, performance requirements, security requirements, etc as appropriate.

demilolu commented 3 years ago

adding @shubham599

demilolu commented 3 years ago

looks like I can't assign this to you yet @shubham599 through Github. but here in the notes:

github-actions[bot] commented 2 years ago

:wave: Hi! This issue has been marked stale due to inactivity. If no further activity occurs, it will automatically be closed.

github-actions[bot] commented 2 years ago

:wave: Hi! This issue has been marked stale due to inactivity. If no further activity occurs, it will automatically be closed.