Skip to content

Commit b2581d5

Browse files
committed
refactor: fix with flake8
1 parent 4581008 commit b2581d5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "nats_queue"
3-
version = "1.0.7"
3+
version = "1.1.1"
44
description = ""
55
authors = ["Kristina Shishkina <k.shishkina@darwinsoft.ru>"]
66
readme = "README.md"

src/nats_queue/nats_worker.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ async def _process_task(self, job: Msg):
114114
await job.nak(delay=delay)
115115
self.logger.debug(
116116
(
117-
f"Job:{job_data['name']} id={job_data['id']} is scheduled later"
117+
f"Job:{job_data['name']} id={job_data['id']} is scheduled later "
118118
f"Requeueing in {delay} seconds"
119119
)
120120
)
@@ -129,7 +129,7 @@ async def _process_task(self, job: Msg):
129129

130130
self.logger.info(
131131
(
132-
f"ob: {job_data['name']} id={job_data['id']} is started"
132+
f"ob: {job_data['name']} id={job_data['id']} is started "
133133
f"with data={job_data['data']}) in queue={job_data['queue_name']}"
134134
)
135135
)
@@ -174,7 +174,7 @@ async def fetch_messages(
174174
msgs = await sub.fetch(count, timeout=self.fetch_timeout)
175175
self.logger.debug(
176176
(
177-
f"Consumer: name={(await sub.consumer_info()).name}"
177+
f"Consumer: name={(await sub.consumer_info()).name} "
178178
f"fetched {len(msgs)} messages"
179179
""
180180
)
@@ -183,15 +183,15 @@ async def fetch_messages(
183183
except TimeoutError:
184184
self.logger.debug(
185185
(
186-
f"Consumer: name={(await sub.consumer_info()).name}"
186+
f"Consumer: name={(await sub.consumer_info()).name} "
187187
f"failed to fetch messages: TimeoutError"
188188
)
189189
)
190190
return []
191191
except Exception as e:
192192
self.logger.error(
193193
(
194-
f"Consumer: name={(await sub.consumer_info()).name}"
194+
f"Consumer: name={(await sub.consumer_info()).name} "
195195
f"error while fetching messages: {e}"
196196
)
197197
)
@@ -207,14 +207,14 @@ async def get_subscriptions(self) -> List[JetStreamContext.PullSubscription]:
207207
)
208208
self.logger.info(
209209
(
210-
f"Consumer: name={self.name}"
210+
f"Consumer: name={self.name} "
211211
f"successfully subscribed to topic {topic}."
212212
)
213213
)
214214
subscriptions.append(sub)
215215
except Exception as e:
216216
self.logger.error(
217-
f"Consumer: name={self.name} error"
217+
f"Consumer: name={self.name} error "
218218
f"while subscribing to topic {topic}: {e}"
219219
)
220220
raise

0 commit comments

Comments
 (0)