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
I am suggesting a new feature, not asking a question
Description
class UserBehavior1(SequentialTaskSet):
max_iterations = 2
def on_start(self):
self.iterations = 0 # Initialize the counter in the on_start method
@task
def my_task(self):
if self.iterations >= self.max_iterations:
self.user.environment.runner.stop()
try:
logging.info("hello2")
self.client.get("/time")
self.iterations += 1
except Exception as e:
logging.info(f"Error during request: {e}")
raise RescheduleTaskImmediately
@task
def my_taskA(self):
logging.info("hello1A")
self.user.environment.runner.stop()
`class WebsiteUser(HttpUser):
def on_start(self):
logging.info("thread started--------------------------------------------------------------")
def on_stop(self):
logging.info("thread stoped+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
wait_time = between(1, 5)
tasks = [UserBehavior1]`
'
I want to run this in worker node is this possible have ieration control and shutdown of task after 10 iteration. As defining a variable for iteration doesn't got the iteration counter correctly and also many time worker struck to stopped event
The text was updated successfully, but these errors were encountered:
Prerequisites
Description
class UserBehavior1(SequentialTaskSet):
max_iterations = 2
'
I want to run this in worker node is this possible have ieration control and shutdown of task after 10 iteration. As defining a variable for iteration doesn't got the iteration counter correctly and also many time worker struck to stopped event
The text was updated successfully, but these errors were encountered: