Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added (optional) logger attribute to init options #52

Closed
wants to merge 7 commits into from
Closed
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
35 changes: 29 additions & 6 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,44 @@ jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Check out repository code
uses: actions/checkout@v2

# Setup Python (faster than using Python container)
- name: Setup Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Python dependencies
python-version: "3.9"

- name: Cache pipenv
uses: actions/cache@v3
id: cache-pipenv
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv

- name: Install pipenv
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pipenv wheel

- name: Install Dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip pipenv
pipenv install --dev
pipenv install --system --deploy --dev

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install redis-server
uses: shogo82148/actions-setup-redis@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mocha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ testing-redis = "~=1.1.1"
channels-redis = "~=3.2.0"

[requires]
python_version = "3.8"
python_version = "3.9"
742 changes: 412 additions & 330 deletions Pipfile.lock

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const customSubscription = client.subscribe(
},
{
includeCreateEvents: true,
includeDeleteEvents: true,
subscribeAction: 'subscribe_all',
unsubscribeAction: 'unsubscribe_all',
},
Expand Down Expand Up @@ -126,6 +127,13 @@ const client = dcrf.connect('wss://example.com', {
*/
pkField: 'id',

/**
* Optionally pass your own winston.Logger instance
*
* Default: default library logger instance
*/
logger: customLogger,

/**
* Whether to ensure subscription delete event payloads store the primary key of the object
* in the configured `pkField`, instead of the default 'pk'.
Expand Down
Loading
Loading