diff --git a/.github/workflows/cypress-end-to-end-tests.yml b/.github/workflows/cypress-end-to-end-tests.yml index 383d0956d..5816894b4 100644 --- a/.github/workflows/cypress-end-to-end-tests.yml +++ b/.github/workflows/cypress-end-to-end-tests.yml @@ -71,9 +71,9 @@ jobs: uses: actions/setup-python@v2 - name: 🪨 Setup Node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 16.16.0 - name: 🤖 Install Mephisto run: pip install -e . @@ -116,9 +116,9 @@ jobs: uses: actions/setup-python@v2 - name: 🪨 Setup Node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 16.16.0 - name: 🤖 Install Mephisto run: pip install -e . @@ -161,9 +161,9 @@ jobs: uses: actions/setup-python@v2 - name: 🪨 Setup Node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 16.16.0 - name: 🤖 Install Mephisto run: pip install -e . @@ -205,9 +205,9 @@ jobs: uses: actions/setup-python@v2 - name: 🪨 Setup Node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 16.16.0 - name: 🤖 Install Mephisto run: | @@ -251,9 +251,9 @@ jobs: uses: actions/setup-python@v2 - name: 🪨 Setup Node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 16.16.0 - name: 🤖 Install Mephisto run: pip install -e . @@ -295,9 +295,9 @@ jobs: uses: actions/setup-python@v2 - name: 🪨 Setup Node - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 16.16.0 - name: 🤖 Install Mephisto run: | diff --git a/mephisto/abstractions/databases/local_database.py b/mephisto/abstractions/databases/local_database.py index 182e29687..3c3e35069 100644 --- a/mephisto/abstractions/databases/local_database.py +++ b/mephisto/abstractions/databases/local_database.py @@ -254,7 +254,7 @@ def _get_connection(self) -> Connection: curr_thread = threading.get_ident() if curr_thread not in self.conn or self.conn[curr_thread] is None: try: - conn = sqlite3.connect(self.db_path) + conn = sqlite3.connect(self.db_path, check_same_thread=False) conn.row_factory = StringIDRow self.conn[curr_thread] = conn except sqlite3.Error as e: diff --git a/mephisto/abstractions/providers/mock/mock_datastore.py b/mephisto/abstractions/providers/mock/mock_datastore.py index 05d456525..e28503eb6 100644 --- a/mephisto/abstractions/providers/mock/mock_datastore.py +++ b/mephisto/abstractions/providers/mock/mock_datastore.py @@ -54,7 +54,7 @@ def _get_connection(self) -> sqlite3.Connection: """ curr_thread = threading.get_ident() if curr_thread not in self.conn or self.conn[curr_thread] is None: - conn = sqlite3.connect(self.db_path) + conn = sqlite3.connect(self.db_path, check_same_thread=False) conn.row_factory = sqlite3.Row self.conn[curr_thread] = conn return self.conn[curr_thread] diff --git a/mephisto/abstractions/providers/mturk/mturk_datastore.py b/mephisto/abstractions/providers/mturk/mturk_datastore.py index 801a9fb9e..d874127af 100644 --- a/mephisto/abstractions/providers/mturk/mturk_datastore.py +++ b/mephisto/abstractions/providers/mturk/mturk_datastore.py @@ -92,7 +92,7 @@ def _get_connection(self) -> sqlite3.Connection: """ curr_thread = threading.get_ident() if curr_thread not in self.conn or self.conn[curr_thread] is None: - conn = sqlite3.connect(self.db_path) + conn = sqlite3.connect(self.db_path, check_same_thread=False) conn.row_factory = sqlite3.Row self.conn[curr_thread] = conn return self.conn[curr_thread]