@@ -36,8 +36,8 @@ def test_rundramatiq_can_run_dramatiq(execvp_mock):
36
36
assert "Discovered tasks module: 'tests.testapp3.tasks.other_tasks'" in buff .getvalue ()
37
37
38
38
# And execvp should be called with the appropriate arguments
39
- cores = str (rundramatiq .CPU_COUNT )
40
- threads = str (rundramatiq .THREAD_COUNT )
39
+ cores = str (rundramatiq .NPROCS )
40
+ threads = str (rundramatiq .NTHREADS )
41
41
expected_exec_name = "dramatiq"
42
42
expected_exec_path = os .path .join (
43
43
os .path .dirname (sys .executable ),
@@ -67,8 +67,8 @@ def test_rundramatiq_can_run_dramatiq_reload(execvp_mock):
67
67
call_command ("rundramatiq" , "--reload" , stdout = buff )
68
68
69
69
# Then execvp should be called with the appropriate arguments
70
- cores = str (rundramatiq .CPU_COUNT )
71
- threads = str (rundramatiq .THREAD_COUNT )
70
+ cores = str (rundramatiq .NPROCS )
71
+ threads = str (rundramatiq .NTHREADS )
72
72
expected_exec_name = "dramatiq"
73
73
expected_exec_path = os .path .join (
74
74
os .path .dirname (sys .executable ),
@@ -99,8 +99,8 @@ def test_rundramatiq_can_run_dramatiq_with_polling(execvp_mock):
99
99
call_command ("rundramatiq" , "--reload" , "--reload-use-polling" , stdout = buff )
100
100
101
101
# Then execvp should be called with the appropriate arguments
102
- cores = str (rundramatiq .CPU_COUNT )
103
- threads = str (rundramatiq .THREAD_COUNT )
102
+ cores = str (rundramatiq .NPROCS )
103
+ threads = str (rundramatiq .NTHREADS )
104
104
expected_exec_name = "dramatiq"
105
105
expected_exec_path = os .path .join (
106
106
os .path .dirname (sys .executable ),
@@ -132,8 +132,8 @@ def test_rundramatiq_can_run_dramatiq_with_only_some_queues(execvp_mock):
132
132
call_command ("rundramatiq" , "--queues" , "A B C" , stdout = buff )
133
133
134
134
# Then execvp should be called with the appropriate arguments
135
- cores = str (rundramatiq .CPU_COUNT )
136
- threads = str (rundramatiq .THREAD_COUNT )
135
+ cores = str (rundramatiq .NPROCS )
136
+ threads = str (rundramatiq .NTHREADS )
137
137
expected_exec_name = "dramatiq"
138
138
expected_exec_path = os .path .join (
139
139
os .path .dirname (sys .executable ),
@@ -164,8 +164,8 @@ def test_rundramatiq_can_run_dramatiq_with_specified_pid_file(execvp_mock):
164
164
call_command ("rundramatiq" , "--pid-file" , "drama.pid" , stdout = buff )
165
165
166
166
# Then execvp should be called with the appropriate arguments
167
- cores = str (rundramatiq .CPU_COUNT )
168
- threads = str (rundramatiq .THREAD_COUNT )
167
+ cores = str (rundramatiq .NPROCS )
168
+ threads = str (rundramatiq .NTHREADS )
169
169
expected_exec_name = "dramatiq"
170
170
expected_exec_path = os .path .join (
171
171
os .path .dirname (sys .executable ),
@@ -196,8 +196,8 @@ def test_rundramatiq_can_run_dramatiq_with_specified_log_file(execvp_mock):
196
196
call_command ("rundramatiq" , "--log-file" , "drama.log" , stdout = buff )
197
197
198
198
# Then execvp should be called with the appropriate arguments
199
- cores = str (rundramatiq .CPU_COUNT )
200
- threads = str (rundramatiq .THREAD_COUNT )
199
+ cores = str (rundramatiq .NPROCS )
200
+ threads = str (rundramatiq .NTHREADS )
201
201
expected_exec_name = "dramatiq"
202
202
expected_exec_path = os .path .join (
203
203
os .path .dirname (sys .executable ),
@@ -244,8 +244,8 @@ def test_rundramatiq_can_ignore_modules(execvp_mock, settings):
244
244
assert "Ignored tasks module: 'tests.testapp3.tasks.utils.not_a_task'" in buff .getvalue ()
245
245
246
246
# And execvp should be called with the appropriate arguments
247
- cores = str (rundramatiq .CPU_COUNT )
248
- threads = str (rundramatiq .THREAD_COUNT )
247
+ cores = str (rundramatiq .NPROCS )
248
+ threads = str (rundramatiq .NTHREADS )
249
249
expected_exec_name = "dramatiq"
250
250
expected_exec_path = os .path .join (
251
251
os .path .dirname (sys .executable ),
@@ -272,8 +272,8 @@ def test_rundramatiq_can_fork(execvp_mock, settings):
272
272
call_command ("rundramatiq" , "--fork-function" , "a" , "--fork-function" , "b" , stdout = buff )
273
273
274
274
# Then execvp should be called with the appropriate arguments
275
- cores = str (rundramatiq .CPU_COUNT )
276
- threads = str (rundramatiq .THREAD_COUNT )
275
+ cores = str (rundramatiq .NPROCS )
276
+ threads = str (rundramatiq .NTHREADS )
277
277
expected_exec_name = "dramatiq"
278
278
expected_exec_path = os .path .join (
279
279
os .path .dirname (sys .executable ),
0 commit comments