check the import_status field before doing SQL operations to check the import url
What does this MR do?
Before we do SQL to look up import urls first do the fast check of checking if the import state machine is "started"
Are there points in the code the reviewer needs to double check?
Do we actually need to check the import URL at all? All the other state checks just check the state machine and trust it. Why is this one special?
Why was this MR needed?
One-time imports, e.g. from the github importer, were doing extra SQL work on every project view to check if the import was in progress. That's pointless since they'll never be started again once they're finished. We could even clear all the import data but this is just as good.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Has been reviewed by Backend
- Has been reviewed by Database
- Conform by the merge request performance guides
- Conform by the style guides
- Squashed related commits together