Skip to content

fix: assign evaluation_timestamp before stale cleanup#384

Open
Grizouforever wants to merge 1 commit intoentrius:testfrom
Grizouforever:fix/clean-evaluation-timestamp
Open

fix: assign evaluation_timestamp before stale cleanup#384
Grizouforever wants to merge 1 commit intoentrius:testfrom
Grizouforever:fix/clean-evaluation-timestamp

Conversation

@Grizouforever
Copy link
Copy Markdown

Summary

  • Add evaluation.evaluation_timestamp = datetime.now(timezone.utc) at the start of cleanup_stale_miner_data in repository.py
  • Previously the timestamp was used as a SQL parameter while still None, preventing stale rows from being correctly cleaned up
  • Add from datetime import datetime, timezone import

Related Issues

Fixes #378

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • Tests added/updated
  • Manually tested

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

cc @anderdc @LandynDev for review

cleanup_stale_miner_data used evaluation.evaluation_timestamp as a
SQL parameter before it was ever set, passing None and leaving stale
rows uncleared. Assign evaluation_timestamp = datetime.now(timezone.utc)
at the start of the method so the timestamp is always available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: evaluation_timestamp is never assigned, stale cleanup SQL always evaluates to NULL

1 participant