Minor refactor
This commit is contained in:
parent
270d5540c6
commit
2a008f1212
1 changed files with 12 additions and 17 deletions
|
@ -108,28 +108,14 @@ class AuthenticatorService {
|
||||||
try {
|
try {
|
||||||
_logger.info("Sync");
|
_logger.info("Sync");
|
||||||
_logger.info("State of DB before sync");
|
_logger.info("State of DB before sync");
|
||||||
_logger.info("_____");
|
await _printDBState();
|
||||||
var entities = await _db.getAll();
|
|
||||||
for (final entity in entities) {
|
|
||||||
_logger.info(entity.id);
|
|
||||||
}
|
|
||||||
await _remoteToLocalSync();
|
await _remoteToLocalSync();
|
||||||
_logger.info("remote fetch completed");
|
_logger.info("remote fetch completed");
|
||||||
_logger.info("State of DB after remoteToLocal sync");
|
_logger.info("State of DB after remoteToLocal sync");
|
||||||
_logger.info("_____");
|
await _printDBState();
|
||||||
entities = await _db.getAll();
|
|
||||||
for (final entity in entities) {
|
|
||||||
_logger.info(entity.id);
|
|
||||||
}
|
|
||||||
_logger.info("_____");
|
|
||||||
await _localToRemoteSync();
|
await _localToRemoteSync();
|
||||||
_logger.info("State of DB after localToRemote sync");
|
_logger.info("State of DB after localToRemote sync");
|
||||||
_logger.info("_____");
|
await _printDBState();
|
||||||
entities = await _db.getAll();
|
|
||||||
for (final entity in entities) {
|
|
||||||
_logger.info(entity.id);
|
|
||||||
}
|
|
||||||
_logger.info("_____");
|
|
||||||
_logger.info("local push completed");
|
_logger.info("local push completed");
|
||||||
Bus.instance.fire(CodesUpdatedEvent());
|
Bus.instance.fire(CodesUpdatedEvent());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -222,4 +208,13 @@ class AuthenticatorService {
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> _printDBState() async {
|
||||||
|
_logger.info("_____");
|
||||||
|
final entities = await _db.getAll();
|
||||||
|
for (final entity in entities) {
|
||||||
|
_logger.info(entity.id);
|
||||||
|
}
|
||||||
|
_logger.info("_____");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue