@@ -7,25 +7,25 @@ class RegistrationProcessor < ApplicationJob
7
7
8
8
def perform ( message )
9
9
Rails . logger . debug { "Working on Message: #{ message } " }
10
- hooks = JobHooks . new
10
+ side_effects = JobSideEffects . new
11
11
if message [ :step ] == 'EventRegistration'
12
12
event_registration ( message [ :competition_id ] ,
13
13
message [ :user_id ] ,
14
14
message [ :step_details ] [ :event_ids ] ,
15
15
message [ :step_details ] [ :comment ] ,
16
16
message [ :step_details ] [ :guests ] ,
17
17
message [ :created_at ] ,
18
- hooks )
18
+ side_effects )
19
19
end
20
20
Rails . cache . delete ( "#{ message [ :user_id ] } -registrations-by-user" )
21
- hooks . run ( :after_processing )
21
+ side_effects . run ( :after_processing )
22
22
Metrics . increment ( 'registrations_processed' )
23
23
end
24
24
25
25
private
26
26
27
27
# rubocop:disable Metrics/ParameterLists
28
- def event_registration ( competition_id , user_id , event_ids , comment , guests , created_at , hooks )
28
+ def event_registration ( competition_id , user_id , event_ids , comment , guests , created_at , side_effects )
29
29
# Event Registration might not be the first lane that is completed
30
30
# TODO: When we add another lane, we need to update the registration history instead of creating it
31
31
registration = begin
@@ -49,7 +49,7 @@ def event_registration(competition_id, user_id, event_ids, comment, guests, crea
49
49
else
50
50
registration . update_attributes ( lanes : registration . lanes . append ( competing_lane ) , guests : guests )
51
51
end
52
- hooks . after_processing do
52
+ side_effects . after_processing do
53
53
EmailApi . send_creation_email ( competition_id , user_id )
54
54
end
55
55
end
0 commit comments