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.

pollTask always runs the first poll?

See original GitHub issue

I have a component that updates every 30 seconds. Since adding in pollTask my acceptance tests now work and no longer hang because of the nested runloop laters… however they always pause for the first 30 seconds, obviously dramatically slowing down my tests.

Is there any way I can tell Lifeline to simply never run the poll after the component init?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
dbbkcommented, Mar 24, 2018

@scalvert yeah that’s what I’ve done at the moment to work around it, but this sounds like a bug with the pollTask implementation? My understanding of its use case would be that it never polls/introduces a delay when testing.

1reaction
scalvertcommented, Feb 2, 2022

Thanks, @lolmaus. The reason I was asking for steps was so that you could clearly articulate the problem succinctly, so that when I spend my free time investigating at addressing this that time is not wasted.

I’ll spend some time thinking about a solution. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Continuous polling using Tasks - Stack Overflow
It returns immediately if bytes are read, returning byte[] array of read bytes. So I basically need to keep polling over and over,...
Read more >
Using Kafka MockConsumer - Baeldung
The first option is to schedule a poll task as we did in the tests above. We do this via schedulePollTask, which takes...
Read more >
Implementing Futures - Futures Explained in 200 Lines of Rust
The executors responsibility is to take one or more futures and run them to completion. The first thing an executor does when it...
Read more >
Polling with Redux saga - Medium
The watcher function runs a RACE between 2 effects 1. A call to a function ; pollTask which returns a Promise. 2. A...
Read more >
The Ember Run Loop and Asynchronous Testing
Ember Lifeline had an innovative approach in the pollTask function — rather than hackily incorporating setTimeout , pollTask handles work ...
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