Open wodCZ opened 6 years ago
Oops, my mistake, timeout is actually correctly converted to milliseconds, only the log message has typo & shows ms
instead of s
.
Closing this as it's not worth of an issue, sorry.
No worries, thanks for reporting and the follow up! I'll actually reopen this to remind myself to correct the log message.
logs still have 'ms'
As per Headless JS documentation, timeout should be provided as a number of miliseconds.
In default configuration, this library sets 30 as timeout parameter, which means 30ms.
Relevant source code lines: index.android.js and RNJob.java.
This typo is very difficult to notice, as it's only visible in logcat:
01-31 16:22:07.293 9869-9869/com.my.app D/BackgroundTask: Returning HeadlessJsTaskConfig, timeout=30 ms
This could be overriden by
timeout
property in schedule method (setting that to 30000). I'm not sure it this wouldn't break iOS implementation though.