File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def setup_periodic_tasks(sender, **kwargs):
3030 sender .add_periodic_task (
3131 600 , calc_search_min_max .s (), name = "Update Minimum and Maximum scores and ages for search every 10 minutes"
3232 )
33- # sender.add_periodic_task(30 , random_bot_action.s(), name="200 random bots actions")
33+ sender .add_periodic_task (10 , random_bot_action .s (), name = "Bots will do random actions" )
3434
3535
3636@celery .task
@@ -148,9 +148,6 @@ def take_random_users_online():
148148
149149@celery .task
150150def random_bot_action ():
151- for user in User .select_random (200 ):
152- if not user .is_online and not user .is_bot :
153- continue
154- else :
155- decide_bot_action (user )
156- return "200 bots done actions"
151+ for user in User .select_random_multis (10 , is_bot = True , is_online = True ):
152+ decide_bot_action (user )
153+ return "Done 10 random actions"
You can’t perform that action at this time.
0 commit comments