Skip to content

Commit 440ba7a

Browse files
committed
refactor: fix code style
1 parent 15b5650 commit 440ba7a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/nats_queue/nats_limiter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def inc(self, new_task_count=1) -> None:
6767
"""
6868
self.count += new_task_count
6969
logger.debug(
70-
f"Task counter incremented by {new_task_count}. Current count: {self.count}."
70+
f"Task counter incremented by {new_task_count}.
71+
Current count: {self.count}."
7172
)
7273

7374
def get(self) -> int:

src/nats_queue/nats_queue.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ async def addJobs(self, jobs: list[Job], priority: int = 1):
9999
raise ValueError("All items in 'jobs' must be instances of Job.")
100100

101101
logger.info(
102-
f"Adding {len(jobs)} jobs to queue='{self.topic_name}' with priority={priority}"
102+
f"Adding {len(jobs)} jobs to queue='{self.topic_name}'
103+
with priority={priority}"
103104
)
104105
for job in jobs:
105106
await self.addJob(job, priority)

src/nats_queue/nats_worker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ async def _process_task(self, msg):
6767
planned_time = job_start_time - datetime.now()
6868
delay = int(planned_time.total_seconds())
6969
logger.info(
70-
f"Job {job_data['name']} is scheduled for later. Requeueing in {delay} seconds."
70+
f"Job {job_data['name']} is scheduled for later.
71+
Requeueing in {delay} seconds."
7172
)
7273
await msg.nak(delay=delay)
7374
logger.info(f"Job {job_data['name']} requeued successfully.")

0 commit comments

Comments
 (0)