more logging on extended bolus
This commit is contained in:
parent
45321f889a
commit
15741b2a02
1 changed files with 8 additions and 5 deletions
|
@ -1048,6 +1048,9 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
|
|
||||||
public boolean createOrUpdate(ExtendedBolus extendedBolus) {
|
public boolean createOrUpdate(ExtendedBolus extendedBolus) {
|
||||||
try {
|
try {
|
||||||
|
if (L.isEnabled(L.DATABASE))
|
||||||
|
log.debug("EXTENDEDBOLUS: createOrUpdate: " + Source.getString(extendedBolus.source) + " " + extendedBolus.log());
|
||||||
|
|
||||||
ExtendedBolus old;
|
ExtendedBolus old;
|
||||||
extendedBolus.date = roundDateToSec(extendedBolus.date);
|
extendedBolus.date = roundDateToSec(extendedBolus.date);
|
||||||
|
|
||||||
|
@ -1071,7 +1074,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
getDaoExtendedBolus().createOrUpdate(extendedBolus);
|
getDaoExtendedBolus().createOrUpdate(extendedBolus);
|
||||||
}
|
}
|
||||||
if (L.isEnabled(L.DATABASE))
|
if (L.isEnabled(L.DATABASE))
|
||||||
log.debug("EXTENDEDBOLUS: New record from: " + Source.getString(extendedBolus.source) + " " + extendedBolus.toString());
|
log.debug("EXTENDEDBOLUS: New record from: " + Source.getString(extendedBolus.source) + " " + extendedBolus.log());
|
||||||
updateEarliestDataChange(extendedBolus.date);
|
updateEarliestDataChange(extendedBolus.date);
|
||||||
scheduleExtendedBolusChange();
|
scheduleExtendedBolusChange();
|
||||||
return true;
|
return true;
|
||||||
|
@ -1085,7 +1088,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
old.copyFrom(extendedBolus);
|
old.copyFrom(extendedBolus);
|
||||||
getDaoExtendedBolus().create(old);
|
getDaoExtendedBolus().create(old);
|
||||||
if (L.isEnabled(L.DATABASE))
|
if (L.isEnabled(L.DATABASE))
|
||||||
log.debug("EXTENDEDBOLUS: Updating record by date from: " + Source.getString(extendedBolus.source) + " " + old.toString());
|
log.debug("EXTENDEDBOLUS: Updating record by date from: " + Source.getString(extendedBolus.source) + " " + old.log());
|
||||||
updateEarliestDataChange(oldDate);
|
updateEarliestDataChange(oldDate);
|
||||||
updateEarliestDataChange(old.date);
|
updateEarliestDataChange(old.date);
|
||||||
scheduleExtendedBolusChange();
|
scheduleExtendedBolusChange();
|
||||||
|
@ -1108,7 +1111,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
old.copyFrom(extendedBolus);
|
old.copyFrom(extendedBolus);
|
||||||
getDaoExtendedBolus().create(old);
|
getDaoExtendedBolus().create(old);
|
||||||
if (L.isEnabled(L.DATABASE))
|
if (L.isEnabled(L.DATABASE))
|
||||||
log.debug("EXTENDEDBOLUS: Updating record by _id from: " + Source.getString(extendedBolus.source) + " " + old.toString());
|
log.debug("EXTENDEDBOLUS: Updating record by _id from: " + Source.getString(extendedBolus.source) + " " + old.log());
|
||||||
updateEarliestDataChange(oldDate);
|
updateEarliestDataChange(oldDate);
|
||||||
updateEarliestDataChange(old.date);
|
updateEarliestDataChange(old.date);
|
||||||
scheduleExtendedBolusChange();
|
scheduleExtendedBolusChange();
|
||||||
|
@ -1118,7 +1121,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
}
|
}
|
||||||
getDaoExtendedBolus().create(extendedBolus);
|
getDaoExtendedBolus().create(extendedBolus);
|
||||||
if (L.isEnabled(L.DATABASE))
|
if (L.isEnabled(L.DATABASE))
|
||||||
log.debug("EXTENDEDBOLUS: New record from: " + Source.getString(extendedBolus.source) + " " + extendedBolus.toString());
|
log.debug("EXTENDEDBOLUS: New record from: " + Source.getString(extendedBolus.source) + " " + extendedBolus.log());
|
||||||
updateEarliestDataChange(extendedBolus.date);
|
updateEarliestDataChange(extendedBolus.date);
|
||||||
scheduleExtendedBolusChange();
|
scheduleExtendedBolusChange();
|
||||||
return true;
|
return true;
|
||||||
|
@ -1126,7 +1129,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
if (extendedBolus.source == Source.USER) {
|
if (extendedBolus.source == Source.USER) {
|
||||||
getDaoExtendedBolus().create(extendedBolus);
|
getDaoExtendedBolus().create(extendedBolus);
|
||||||
if (L.isEnabled(L.DATABASE))
|
if (L.isEnabled(L.DATABASE))
|
||||||
log.debug("EXTENDEDBOLUS: New record from: " + Source.getString(extendedBolus.source) + " " + extendedBolus.toString());
|
log.debug("EXTENDEDBOLUS: New record from: " + Source.getString(extendedBolus.source) + " " + extendedBolus.log());
|
||||||
updateEarliestDataChange(extendedBolus.date);
|
updateEarliestDataChange(extendedBolus.date);
|
||||||
scheduleExtendedBolusChange();
|
scheduleExtendedBolusChange();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue