File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,7 @@ def before_first_fork(&block)
77
77
78
78
# Set a proc that will be called in the parent process before the
79
79
# worker forks for the first time.
80
- def before_first_fork = ( before_first_fork )
81
- @before_first_fork = before_first_fork
82
- end
80
+ attr_writer :before_first_fork
83
81
84
82
# The `before_fork` hook will be run in the **parent** process
85
83
# before every job, so be careful- any changes you make will be
@@ -92,9 +90,7 @@ def before_fork(&block)
92
90
end
93
91
94
92
# Set the before_fork proc.
95
- def before_fork = ( before_fork )
96
- @before_fork = before_fork
97
- end
93
+ attr_writer :before_fork
98
94
99
95
# The `after_fork` hook will be run in the child process and is passed
100
96
# the current job. Any changes you make, therefore, will only live as
@@ -107,9 +103,7 @@ def after_fork(&block)
107
103
end
108
104
109
105
# Set the after_fork proc.
110
- def after_fork = ( after_fork )
111
- @after_fork = after_fork
112
- end
106
+ attr_writer :after_fork
113
107
114
108
def to_s
115
109
"Resque Client connected to #{ redis_id } "
You can’t perform that action at this time.
0 commit comments