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 {
|
||||
_logger.info("Sync");
|
||||
_logger.info("State of DB before sync");
|
||||
_logger.info("_____");
|
||||
var entities = await _db.getAll();
|
||||
for (final entity in entities) {
|
||||
_logger.info(entity.id);
|
||||
}
|
||||
await _printDBState();
|
||||
await _remoteToLocalSync();
|
||||
_logger.info("remote fetch completed");
|
||||
_logger.info("State of DB after remoteToLocal sync");
|
||||
_logger.info("_____");
|
||||
entities = await _db.getAll();
|
||||
for (final entity in entities) {
|
||||
_logger.info(entity.id);
|
||||
}
|
||||
_logger.info("_____");
|
||||
await _printDBState();
|
||||
await _localToRemoteSync();
|
||||
_logger.info("State of DB after localToRemote sync");
|
||||
_logger.info("_____");
|
||||
entities = await _db.getAll();
|
||||
for (final entity in entities) {
|
||||
_logger.info(entity.id);
|
||||
}
|
||||
_logger.info("_____");
|
||||
await _printDBState();
|
||||
_logger.info("local push completed");
|
||||
Bus.instance.fire(CodesUpdatedEvent());
|
||||
} catch (e) {
|
||||
|
@ -222,4 +208,13 @@ class AuthenticatorService {
|
|||
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