Skip to content

Commit

Permalink
Workflow triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
danielebriggi committed May 24, 2024
1 parent 22724e4 commit d95332b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ name: Test and Release

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

Expand Down
6 changes: 3 additions & 3 deletions src/sqlitecloud/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ def _internal_pubsub_thread(self, connection: SQCloudConnect) -> None:
ready_to_read, _, errors = select.select(
[connection.pubsub_socket], [], []
)
# eg, no data to read
if len(ready_to_read) == 0:
continue
# eg, if the socket is closed
if len(errors) > 0:
break
# eg, no data to read
if len(ready_to_read) == 0:
continue

data = connection.pubsub_socket.recv(blen)
if not data:
Expand Down
4 changes: 2 additions & 2 deletions src/tests/integration/test_pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ def assert_callback(conn, result, data):
pubsub2 = SqliteCloudPubSub()
pubsub2.notify_channel(connection2, channel, "message-in-a-bottle")

client.disconnect(connection2)

# wait for callback to be called
flag.wait(30)

assert callback_called

client.disconnect(connection2)

def test_listen_table_for_update(self, sqlitecloud_connection):
connection, client = sqlitecloud_connection

Expand Down

0 comments on commit d95332b

Please sign in to comment.