Skip to content

Commit 92e77b8

Browse files
authored
Merge branch 'main' into develop
2 parents 5b686c3 + 8f0e4bb commit 92e77b8

4 files changed

Lines changed: 56 additions & 12 deletions

File tree

.github/workflows/blank.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the "main" branch
8+
push:
9+
branches: [ "main" ]
10+
pull_request:
11+
branches: [ "main" ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
build:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v3
27+
28+
# Runs a single command using the runners shell
29+
- name: Run a one-line script
30+
run: echo Hello, world!
31+
32+
# Runs a set of commands using the runners shell
33+
- name: Run a multi-line script
34+
run: |
35+
echo Add other actions to build,
36+
echo test, and deploy your project.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change log
22

3+
# 0.0.18
4+
- Adds extra checks in service bus for retries
5+
- Additional logging done if there is no network and service bus crashes
6+
- Service bus subscription picks up messages even if there is network outtage
37

48
### 0.0.17
59
- Added Unit Test Cases

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ In case `api_url` is not provided for `Hosted` auth provider, the core will pick
239239

240240
#### Requesting if certain permission is valid:
241241

242-
Use the method `has_ermission(request_params)` to know if the permission request is valid/not.
242+
Use the method `has_permission(request_params)` to know if the permission request is valid/not.
243243

244244
```python
245245

src/python_ms_core/core/topic/topic.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,21 @@ def process_message(self, message:str):
4040
# Starts listening to the messages
4141
def start_listening(self, provider, topic, subscription):
4242
with provider.client: # service bus client
43-
while True:
44-
logger.info('Initiatig receiver')
45-
topic_receiver = provider.client.get_subscription_receiver(topic, subscription_name=subscription) # servicebusclientsubscriptionreceiver
46-
with topic_receiver:
47-
for message in topic_receiver:
48-
try:
49-
self.process_message(message=str(message)) # sync call. [By default 1minute ] -> lock renewal for 300 seconds
50-
except Exception as e:
51-
print(f'Error : {e}, Invalid message received : {message}')
52-
finally:
53-
topic_receiver.complete_message(message)
43+
logger.info('Initiating receiver')
44+
topic_receiver = provider.client.get_subscription_receiver(topic, subscription_name=subscription) # servicebusclientsubscriptionreceiver
45+
logger.info('Done')
46+
with topic_receiver:
47+
while True:
48+
try:
49+
for message in topic_receiver:
50+
try:
51+
self.process_message(message=str(message)) # sync call. [By default 1minute ] -> lock renewal for 300 seconds
52+
except Exception as e:
53+
print(f'Error : {e}, Invalid message received : {message}')
54+
finally:
55+
topic_receiver.complete_message(message)
56+
except Exception as et:
57+
print(f'Error in service bus connection : {et}')
5458
# Change mode from PEEK_LOCK to RECEIVE_AND_DELETE
5559
logger.info('Topic receiver invalidated')
5660

0 commit comments

Comments
 (0)