Skip to content

Commit

Permalink
Make sure we subscribe to all the websocket channels that we intend t…
Browse files Browse the repository at this point in the history
…o use.
  • Loading branch information
alecpm committed Nov 7, 2024
1 parent 4f690d6 commit 1db3f3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dlgr/griduniverse/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from dallinger.compat import unicode
from dallinger.config import get_config
from dallinger.experiment import Experiment
from dallinger.experiment_server import sockets
from faker import Factory
from sqlalchemy import create_engine, func
from sqlalchemy.orm import scoped_session, sessionmaker
Expand Down Expand Up @@ -1653,7 +1654,6 @@ def game_loop(self):
class Griduniverse(Experiment):
"""Define the structure of the experiment."""

channel = "griduniverse_ctrl"
state_count = 0
replay_path = "/grid"

Expand Down Expand Up @@ -1743,7 +1743,9 @@ def start_games(self):
# when performance is an issue? The main problem with that approach is
# that the games will not share a single MTurk HIT.
for game in self.games:
sockets.chat_backend.subscribe(self, game.control_channel)
game.on_launch()
sockets.chat_backend.subscribe(self, sockets.CONTROL_CHANNEL)

def create_network(self):
"""Create a new network by reading the configuration file."""
Expand Down

0 comments on commit 1db3f3f

Please sign in to comment.