Prevent BitBucket Server to continue running workers when import fails
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=414966)
</details>
<!--IssueSummary end-->
On GitHub Import, we [updated the workers](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122141) to stop processing when the import state is on failed state. We should apply the same check on BitButcket Server import as the workers shouldn't keep running when the import state is a final state (canceled, failed, finished)
issue