Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejka committed Oct 21, 2024
1 parent 11f6aaa commit 5cc9cc2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/data/client2.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def job_producer(job_gen):
f"Adding job: {job}, current total weight: {current_weight}..."
)
while (
(current_weight + weight > MAX_WEIGHT_LIMIT) and current_weight != 0
(current_weight + weight > MAX_WEIGHT_LIMIT)
and current_weight != 0
or job_queue.full()
):
logger.debug("Producer is waiting for weight to be released.")
Expand All @@ -157,14 +158,15 @@ def job_producer(job_gen):
logger.debug("Consumers notified")



# Consumer function: Processes blocks from the queue
def job_consumer(process_job):
global current_weight

while True:
try:
logger.debug(f"Consumer is waiting for a job. Queue lenght: {job_queue.qsize()}")
logger.debug(
f"Consumer is waiting for a job. Queue lenght: {job_queue.qsize()}"

Check warning on line 168 in scripts/data/client2.py

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"lenght" should be "length".
)
# Get a job from the queue
work_to_do = job_queue.get(block=True)

Expand Down Expand Up @@ -259,9 +261,7 @@ def main(start, blocks, step, mode, strategy):
choices=["sequential", "random"],
help="Processing strategy",
)
parser.add_argument(
"--verbose", action="store_true", help="Verbose"
)
parser.add_argument("--verbose", action="store_true", help="Verbose")

args = parser.parse_args()

Expand All @@ -279,7 +279,7 @@ def main(start, blocks, step, mode, strategy):
root_logger = logging.getLogger()
root_logger.addHandler(console_handler)
root_logger.addHandler(file_handler)

if args.verbose:
root_logger.setLevel(logging.DEBUG)
else:
Expand Down

0 comments on commit 5cc9cc2

Please sign in to comment.