mysql - record and check state of local files #32

Merged
bones7242 merged 10 commits from mysql into master 2017-06-17 06:21:35 +02:00
2 changed files with 17 additions and 6 deletions
Showing only changes of commit 50d65de6a4 - Show all commits

View file

@ -1,4 +1,5 @@
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
var axios = require('axios');
var db = require("../models");
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
module.exports = {
publishClaim: function(publishParams){
@ -33,7 +34,18 @@ module.exports = {
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
/*
kauffj commented 2017-06-16 23:42:45 +02:00 (Migrated from github.com)
Review

This section can be simplified by avoiding repetition of response.data.result.

This section can be simplified by avoiding repetition of `response.data.result`.
kauffj commented 2017-06-16 23:43:13 +02:00 (Migrated from github.com)
Review

(unnecessary return)

(unnecessary return)
bones7242 commented 2017-06-17 00:36:10 +02:00 (Migrated from github.com)
Review

✔️

:heavy_check_mark:
bones7242 commented 2017-06-17 00:39:14 +02:00 (Migrated from github.com)
Review

✔️

:heavy_check_mark:
note: put in a check to make sure we do not resolve until the download is actually complete (response.data.completed === true)
*/
resolve(getResponse.data);
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
// save a record of the file to the Files table
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
db.File.create({
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
name: getResponse.data.result.file_name,
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
path: getResponse.data.result.download_path,
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
file_type: getResponse.data.result.mime_type,
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
claim_id: getResponse.data.result.claim_id,
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
nsfw: getResponse.data.result.metadata.stream.metadata.nsfw,
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
}).catch(function(error){
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
console.log('an error occurred when writing to the MySQL database. Check the logs.');
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
});
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
// resolve the promise
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
resolve(getResponse.data); //to do: return the result
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
}).catch(function(getUriError){
console.log(">> 'get' error");
// reject the promise with an error message

kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.
kauffj commented 2017-06-16 23:39:34 +02:00 (Migrated from github.com)
Review

It might be a good idea to declare an extremely simple error logging class or function that simply calls console.log internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls.

Not a blocking suggestion.

It might be a good idea to declare an extremely simple error logging class or function that simply calls `console.log` internally. That way when you want to replace it later with more sophisticated logging, you can do so easily, rather than needing to track down all the log calls. Not a blocking suggestion.
kauffj commented 2017-06-16 23:49:22 +02:00 (Migrated from github.com)
Review

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.

Writing all paths as relative from the root project folder rather than relative from the current file will make for later easier refactoring IMO.
bones7242 commented 2017-06-17 04:24:43 +02:00 (Migrated from github.com)
Review

good point. will aim to address on next update.

good point. will aim to address on next update.
bones7242 commented 2017-06-17 04:25:13 +02:00 (Migrated from github.com)
Review

agreed. will wait and address this with the next big update which will be focused on logging.

agreed. will wait and address this with the next big update which will be focused on logging.

View file

@ -87,7 +87,7 @@ module.exports = {
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// check to see if the file is available locally
db.File.findOne({where: { claim_id: claimId }})
.then(function(claim){
console.log("asset found locally >>", claim)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
console.log(">> Asset was found locally");
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// if a record is found, return it
if (claim){
var fileInfo = {
@ -126,15 +126,14 @@ module.exports = {
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// check locally for the claim
db.File.findOne({where: { claim_id: claimId }})
.then(function(claim){
console.log("asset found locally >>", claim)
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
console.log(">> Asset was found locally");
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// if a record is found, return it
if (claim){
var fileInfo = {
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
resolve({
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
file_name: claim.dataValues.name,
download_path: claim.dataValues.path,
content_type: claim.dataValues.file_type
}
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
resolve(fileInfo);
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
});
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
// ... otherwise use daemon to retrieve it
} else {
// get the claim info via 'resolve'

kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.
kauffj commented 2017-06-16 23:48:03 +02:00 (Migrated from github.com)
Review

lbryHelpers.js sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.

`lbryHelpers.js` sounds like and sort of looks like the kind of file that is on track to accumulate a lot of functions and become a mess. Worth looking at the typical patterns for unique or business-level modal functions in this framework.
bones7242 commented 2017-06-17 04:23:42 +02:00 (Migrated from github.com)
Review

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.

may have gone a little overboard, but I did a big reorganize to address this because I agree itt was getting disorganized. This hopefully will lay the groundwork for better organization going forward. Separated out true controller functions from helper methods.