You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the constant_pacing wait time strategy in a task set, an error is thrown. TaskSet instances do not have a _cp_last_run attribute.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\P3701275\projects\20240104_TaskSetTest\venv\Lib\site-packages\locust\user\task.py", line 343, in run
self.execute_next_task()
File "C:\Users\P3701275\projects\20240104_TaskSetTest\venv\Lib\site-packages\locust\user\task.py", line 376, in execute_next_task
self.execute_task(self._task_queue.pop(0))
File "C:\Users\P3701275\projects\20240104_TaskSetTest\venv\Lib\site-packages\locust\user\task.py", line 494, in execute_task
task(self.user).run()
File "C:\Users\P3701275\projects\20240104_TaskSetTest\venv\Lib\site-packages\locust\user\task.py", line 371, in run
self.wait()
File "C:\Users\P3701275\projects\20240104_TaskSetTest\venv\Lib\site-packages\locust\user\task.py", line 449, in wait
self._sleep(self.wait_time())
^^^^^^^^^^^^^^^^
File "C:\Users\P3701275\projects\20240104_TaskSetTest\venv\Lib\site-packages\locust\user\wait_time.py", line 52, in wait_time_func
run_time = time() - self._cp_last_run - self._cp_last_wait_time
^^^^^^^^^^^^^^^^^
AttributeError: 'MyTaskSet' object has no attribute '_cp_last_run'
Prerequisites
Description
When using the
constant_pacing
wait time strategy in a task set, an error is thrown.TaskSet
instances do not have a_cp_last_run
attribute.Command line
locust -f locustfile_cp_nested.py -t 20s -H "http://www.google.com" --headless
Locustfile contents
Python version
3.11
Locust version
2.20.1
Operating system
Windows
The text was updated successfully, but these errors were encountered: