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.

Debugging+Logging: find out when sync function run in asynq context

See original GitHub issue

As 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:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
manannayakcommented, May 26, 2017

Yep

0reactions
JelleZijlstracommented, May 26, 2017

We should really document that options mechanism.

Read more comments on GitHub >

github_iconTop 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 >

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