Skip to content

Conversation

@igor-gorohovsky
Copy link
Contributor

@igor-gorohovsky igor-gorohovsky commented Mar 21, 2025

@igor-gorohovsky
Copy link
Contributor Author

@s3rius Maybe we should add a warning for other task methods if the result backend is not set. What do you think?

Copy link
Member

@s3rius s3rius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion the isinstance method is quite expensive to call. We can just add raise in the DummyBackend itself.

Because this isinstance call will be triggered for any ResultBackend. Which might decrease performance.

s3rius
s3rius previously approved these changes Mar 24, 2025
@s3rius
Copy link
Member

s3rius commented Mar 24, 2025

I'm wondering. Maybe it'd be better to use warn module to make warnings appear even if you haven't configured logging.

@s3rius s3rius merged commit c0374eb into taskiq-python:master Mar 24, 2025
33 checks passed
s3rius added a commit that referenced this pull request Apr 4, 2025
* warn on .wait_result call if there is no result backend

* warn user on dummy result backend level

* use warn from warnings module

---------

Co-authored-by: Pavel Kirilin <[email protected]>
s3rius added a commit that referenced this pull request Apr 4, 2025
* warn on .wait_result call if there is no result backend

* warn user on dummy result backend level

* use warn from warnings module

---------

Co-authored-by: Pavel Kirilin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants