Skip to content

Commit

Permalink
fix end of file/line
Browse files Browse the repository at this point in the history
  • Loading branch information
dimastbk committed Oct 9, 2024
1 parent c9ee6b3 commit 7b76322
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.11'
- name: Init python poetry action
uses: abatilo/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ cython_debug/
.pytest_cache

# pycharm
.idea
.idea
9 changes: 8 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-toml
- id: check-added-large-files
- repo: local
hooks:
- id: black
Expand Down Expand Up @@ -31,4 +38,4 @@ repos:
- id: ruff
args:
- --fix
exclude: ^(tests/.*|examples/.*|docs/.*)$
exclude: ^(tests/.*|examples/.*|docs/.*)$
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
2. Update the README.md with details of changes to the interface, this includes new environment
variables, useful file locations etc.
3. Increase the version numbers in any examples files and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.

## Code of Conduct
Expand Down
10 changes: 5 additions & 5 deletions docs/channels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ In order to instantiate a ZeebeWorker or ZeebeClient you will need to provide an
This Channel can be configured with the parameters `channel_credentials` and `channel_options`.

.. seealso::

`Python Channel Options <https://grpc.github.io/grpc/python/glossary.html#term-channel_arguments>`_
Documentation of the available Python `grpc.aio.Channel` `options` (channel_arguments).


.. note::

By default, channel_options is defined so that the grpc.keepalive_time_ms option is always set to 45_000 (45 seconds).
Reference Camunda Docs `keep alive intervals <https://docs.camunda.io/docs/self-managed/zeebe-deployment/operations/setting-up-a-cluster/#keep-alive-intervals>`_.

You can override the default `channel_options` by passing
e.g. `channel_options = (("grpc.keepalive_time_ms", 60_000),)` - for a keepalive time of 60 seconds.


Pyzeebe provides a couple standard ways to achieve this:

Expand Down Expand Up @@ -81,7 +81,7 @@ Oauth2 Client Credentials Channel

.. autofunction:: pyzeebe.channel.oauth_channel.create_oauth2_client_credentials_channel

.. warning::
.. warning::
Some arguments are Optional and are highly dependent on your Authentication Server configuration,
`scope` is usually required and is often optional `audience` .

Expand Down Expand Up @@ -181,5 +181,5 @@ Example:
from pyzeebe.channel.camunda_cloud_channel import create_camunda_cloud_channel
channel = create_camunda_cloud_channel("client_id", "client_secret", "cluster_id")
4 changes: 2 additions & 2 deletions docs/credentials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Oauth2 Client Credentials Plugin
:members:
:special-members:
:private-members:

Example:

.. code-block:: python
Expand Down Expand Up @@ -54,4 +54,4 @@ Internal (Deprecated)

.. autoclass:: pyzeebe.CamundaIdentityCredentials
:members:
:undoc-members:
:undoc-members:
5 changes: 2 additions & 3 deletions docs/worker_quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ Run using event loop
.. warning::

Calling ``worker.work`` directly using ``asyncio.run`` will not work. When you create an async grpc channel a new event loop will automatically be created, which causes problems when running the worker (see: https://github.com/camunda-community-hub/pyzeebe/issues/198).

An easy workaround:

.. code-block:: python
async def main():
channel = create_insecure_channel()
worker = ZeebeWorker(channel)
Expand Down Expand Up @@ -86,4 +86,3 @@ To stop a running worker:
# Trigger this on some event (SIGTERM for example)
async def shutdown():
await worker.stop()
4 changes: 2 additions & 2 deletions docs/worker_tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Tasks can be regular or async functions. If given a regular function, pyzeebe wi
.. note::

Make sure not to call any blocking function in an async task. This would slow the entire worker down.

Do:

.. code-block:: python
Expand Down Expand Up @@ -87,7 +87,7 @@ This tells Zeebe that the job failed. The job will then be retried (if configure

.. note::
The exception handler can also be set via :py:class:`pyzeebe.ZeebeWorker` or :py:class:`pyzeebe.ZeebeTaskRouter`.
Pyzeebe will try to find the exception handler in the following order:
Pyzeebe will try to find the exception handler in the following order:
``Worker`` -> ``Router`` -> ``Task`` -> :py:func:`pyzeebe.default_exception_handler`


Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ strict = true

[[tool.mypy.overrides]]
module = [
"grpc",
"zeebe_grpc.gateway_pb2",
"zeebe_grpc.gateway_pb2_grpc",
"grpc",
"zeebe_grpc.gateway_pb2",
"zeebe_grpc.gateway_pb2_grpc",
]
ignore_missing_imports = true

Expand Down

0 comments on commit 7b76322

Please sign in to comment.