Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
os: [ ubuntu-latest ]
services:
redis:
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '18'

- name: Setup
run: npm install -g semantic-release @semantic-release/github @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/git @semantic-release/release-notes-generator semantic-release-pypi
Expand All @@ -101,4 +101,4 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: npx semantic-release
run: npx semantic-release
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if __name__ == "main":
test_option.host = "localhost"
test_option.port = "6379"
test_option.channel = "test"
test_option.ssl = False
test_option.optional_update_callback = callback_function
w = new_watcher(test_option)

Expand Down
1 change: 1 addition & 0 deletions casbin_redis_watcher/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class WatcherOptions:
password = None
host = "localhost"
port = "6379"
ssl = False
sub_client = None
pub_client = None
channel = None
Expand Down
4 changes: 2 additions & 2 deletions casbin_redis_watcher/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def unmarshal_binary(data: bytes):
def new_watcher(option: WatcherOptions):
option.init_config()
w = RedisWatcher()
rds = Redis(host=option.host, port=option.port, password=option.password)
rds = Redis(host=option.host, port=option.port, password=option.password, ssl=option.ssl)
if rds.ping() is False:
raise Exception("Redis server is not available.")
w.sub_client = rds.client().pubsub()
Expand All @@ -161,7 +161,7 @@ def new_watcher(option: WatcherOptions):
def new_publish_watcher(option: WatcherOptions):
option.init_config()
w = RedisWatcher()
rds = Redis(host=option.host, port=option.port, password=option.password)
rds = Redis(host=option.host, port=option.port, password=option.password, ssl=option.ssl)
if rds.ping() is False:
raise Exception("Redis server is not available.")
w.pub_client = rds.client()
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
casbin==1.16.8
redis==4.3.4
casbin==1.18.0
redis==4.5.2