Skip to content

fix: vehicle fines and insurance sync timeouts and crashes#360

Open
MariamMabele wants to merge 2 commits into
Aakvatech-Limited:version-15-hotfixfrom
MariamMabele:fix-vehicle-fine-paid-status-sync
Open

fix: vehicle fines and insurance sync timeouts and crashes#360
MariamMabele wants to merge 2 commits into
Aakvatech-Limited:version-15-hotfixfrom
MariamMabele:fix-vehicle-fine-paid-status-sync

Conversation

@MariamMabele

Copy link
Copy Markdown
Contributor

This update fixes major issues in how we fetch data for vehicle fines (TPF) and insurance cover notes (Tiramis).
Helper Function (vehicle_authority.py):

  • Added a smart helper that automatically finds all vehicles, trucks, and trailers in the system by looking for license plate fields. Fines and Insurance Sync (vehicle_fine_record.py & tz_insurance_cover_note.py):
  • Moved the syncing process to the background queue. This stops the system from freezing or timing out after 5 minutes when checking hundreds of vehicles.
  • Added a check to skip duplicate license plates, so we don't ask the API for the same vehicle twice.
  • Automatically cleans up spaces in license plates and skips empty or invalid ones.

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.

1 participant