Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All tasks has pauses in execution #63

Closed
artemukolov opened this issue Nov 9, 2017 · 8 comments
Closed

All tasks has pauses in execution #63

artemukolov opened this issue Nov 9, 2017 · 8 comments

Comments

@artemukolov
Copy link

When I tried to run you example app on me machine, then I see that all tasks has pauses during execution. And doesn't matter, job in background or not. On screen shot log of react-native example app. There in one of several pauses between 14:50:17.725 and 14:54:53
screen shot 2017-11-09 at 14 58 13

Is it fixable? Thank you

@vikeri
Copy link
Owner

vikeri commented Nov 9, 2017

What do you mean by pauses?

@artemukolov
Copy link
Author

absence of iteration

@vikeri
Copy link
Owner

vikeri commented Nov 9, 2017

I see, well unfortunately you can't rely on the library firing at exact times. Sometimes Android won't let it run.

@artemukolov
Copy link
Author

ok. Also I noticed jobs with allowExecutionInForeground: true has more weird behaviour. They stoped after 15-20 iterations at all.

@vikeri
Copy link
Owner

vikeri commented Nov 9, 2017

Interesting, I don't personally use the allowExecutionInForeground options since it's discouraged by the devs and ideally should only be used for debugging. Does it happen consistently or did you only encounter it once?

@artemukolov
Copy link
Author

consistently. This going in your example app. Did you try to check it?
(I use real device.)

@artemukolov
Copy link
Author

So. you said that you don't use allowExecutionInForeground: true.
How yoou use one job for background and foreground?

@vikeri
Copy link
Owner

vikeri commented Nov 9, 2017

I use Bluetooth so in the foreground I'm constantly connected and in the background I periodically wake up to check if there is any new data available from the peripheral. In the foreground a simple setIntervalworks for recurring tasks.

Also, I created an issue for the foreground tasks. Closing this one.

@vikeri vikeri closed this as completed Nov 9, 2017
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

No branches or pull requests

2 participants