question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

huey.consumer.Consumer.worker_threads right now is a list of tuples (worker, process).

But the first item is never used, because it is recreated each time ( https://github.com/coleifer/huey/blob/0447c6046e7475ec31e9d0796ccc6c7f906bfaef/huey/consumer.py#L589 ). worker_threads can be a list of processes instead to make the code simpler to understand and maintain.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
mindojo-victorcommented, Apr 26, 2018

When did I say this?

I suggested the same thing here https://github.com/coleifer/huey/issues/265#issuecomment-337261204

But you suggested to use an uglier way. So I made the conclusion that you don’t want to make it easier to override the internals.

there’s an entitled vibe coming across that you may not be aware of.

Sorry, I am not a native English speaker, so I am not sure what this idiom means. But I think I understand what you mean.

I feel like I am fighting with you. To me it looks like you oppose some of changes. I kind of understand why, but I don’t think it’s wise.

That’s were my attitude comes from.

So I think I could address the same quote to you… 😃

1reaction
coleifercommented, Apr 25, 2018

You’re correct. It makes things like testing easier to have the worker class and the associated process in the same data-structure, because once you wrap the worker class in a greenlet/thread/process, there’s no way to reference it after the fact. It’s not being used outside of the tests, at present, though. Perhaps I can make some better comments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refactoring
Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.
Read more >
clean your code - Refactoring.Guru
Refactoring is the controllable process of systematically improving your code without writing new functionality. The goal of refactoring is to pay off ...
Read more >
Code refactoring - Wikipedia
In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the factoring—without changing ...
Read more >
What is Refactoring (Code Refactoring)? - TechTarget
Refactoring is the process of restructuring code, while not changing its original functionality. The goal of refactoring is to improve internal code by ......
Read more >
Refactoring - Martin Fowler
Refactoring is a controlled technique for improving the design of an existing code base. Its essence is applying a series of small behavior-preserving ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found