Merge pull request #1052 from lbryio/fixesJan20
pagination (thanks Tom)
This commit is contained in:
commit
3d23635bf5
3 changed files with 9 additions and 3 deletions
|
@ -8,7 +8,7 @@ dist: xenial
|
|||
# - mysql-client
|
||||
language: node_js
|
||||
node_js:
|
||||
- "lts/*"
|
||||
- "lts/dubnium"
|
||||
cache:
|
||||
directories:
|
||||
- "node_modules"
|
||||
|
|
|
@ -201,6 +201,10 @@ export default (db, table, sequelize) => ({
|
|||
}
|
||||
|
||||
return claimArray[0];
|
||||
})
|
||||
.catch(error => {
|
||||
logger.verbose(`resolveClaim failed: ${error}`)
|
||||
reject(error);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -13,8 +13,10 @@ const awaitFileSize = (outpoint, size, interval, timeout) => {
|
|||
function checkFileList() {
|
||||
logger.debug('checkFileList');
|
||||
return getFileListFileByOutpoint(outpoint).then(result => {
|
||||
logger.debug('File List Result', result);
|
||||
if (result[0]['completed'] === true || result[0]['written_bytes'] > size) {
|
||||
const { items: fileInfos } = result;
|
||||
const fileInfo = fileInfos[0];
|
||||
logger.debug('File List Result', fileInfo);
|
||||
if (fileInfo.completed === true || fileInfo.written_bytes > size) {
|
||||
logger.debug('FILE READY');
|
||||
return 'ready';
|
||||
} else if (timeout !== 0 && Date.now() - start > timeout) {
|
||||
|
|
Loading…
Reference in a new issue