BURs: add processing and failed states.
When a BUR is approved, put it in a `processing` state. After it successfully finishes processing, put it in the `approved` state. If it fails processing, put it in the `failed` state. If approving the BUR fails with a validation error, for example because the alias already exists or an implication lacks a wiki, then leave the BUR in the `pending` state. The `failed` state is only for unexpected errors during processing.
This commit is contained in:
@@ -171,6 +171,11 @@ class BulkUpdateRequestProcessor
|
||||
raise Error, "Unknown command: #{command}"
|
||||
end
|
||||
end
|
||||
|
||||
bulk_update_request.update!(status: "approved")
|
||||
rescue StandardError
|
||||
bulk_update_request.update!(status: "failed")
|
||||
raise
|
||||
end
|
||||
|
||||
# The list of tags in the script. Used for search BURs by tag.
|
||||
|
||||
Reference in New Issue
Block a user