Debugging+Logging: find out when sync function run in asynq context
See original GitHub issueAs we migrate our code to use asynq, we would love a way to detect usages of sync calls within asynq contexts.
For example, imagine:
@asynq.async()
def data_fetch_1():
return 5
@asynq.async()
def data_fetch_times_2():
data = data_fetch_1()
return data + data
This will incur a sync fetch within an already asynq call which should be fixed since it incurs performance penalties especially when data_fetch_2
is batched.
I have not seen a way to log/debug/add a hook to figure out when this happens
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Debugging async operations in Node.js - LogRocket Blog
The async hooks function executionAsyncId is used to retrieve the async ID of the synthesized asynchronous operation. We then run the user code ......
Read more >Debug asynchronous code | IntelliJ IDEA Documentation
Debugging asynchronous code is a challenge because the tasks are often scheduled in one thread and executed in another.
Read more >Debugging Asynchronous Javascipt - codeburst
When a bug occurs in a complex web asynchronous promises and 'unpromisifiable' callbacks, it can kill a lot of brain cells trying to...
Read more >How JavaScript works: debugging overview + 4 tips for async ...
The first step to debugging asynchronous code is to use the console. log() function in different code sections. Use the try and catch ......
Read more >Developing with asyncio — Python 3.11.1 documentation
setting the log level of the asyncio logger to logging.DEBUG , for example the following snippet of code can be run at startup...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yep
We should really document that options mechanism.