Skip to content

Commit

Permalink
Add notification when finished without errors
Browse files Browse the repository at this point in the history
  • Loading branch information
just806me committed Oct 1, 2023
1 parent dc53e4f commit 29c67c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/channels/api_channel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def finish data
dispatch_all 'comments/load', Comment.includes(:user).where(task_id:)
dispatch_all 'app/finish'

dispatch_self 'notifications/push', kind: 'info', message: 'Calculating results …'

users_without_result = []
begin
result_multiplier = Rational task.result_multiplier
Expand All @@ -171,6 +173,8 @@ def finish data
task.update_column :scoring_open, true
dispatch_self 'app/ready', ready_info
raise e
else
dispatch_self 'notifications/push', kind: 'success', message: 'Results calculated'
end
end

Expand Down

0 comments on commit 29c67c4

Please sign in to comment.