Merge branch 'mkirk/cleanup-after-db-registration'
This commit is contained in:
commit
8b1bea8d12
@ -30,6 +30,7 @@
|
||||
#import <SignalServiceKit/OWSFailedMessagesJob.h>
|
||||
#import <SignalServiceKit/OWSMessageManager.h>
|
||||
#import <SignalServiceKit/OWSMessageSender.h>
|
||||
#import <SignalServiceKit/OWSOrphanedDataCleaner.h>
|
||||
#import <SignalServiceKit/OWSReadReceiptManager.h>
|
||||
#import <SignalServiceKit/TSAccountManager.h>
|
||||
#import <SignalServiceKit/TSDatabaseView.h>
|
||||
@ -855,6 +856,17 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
|
||||
|
||||
self.isEnvironmentSetup = YES;
|
||||
|
||||
#ifdef DEBUG
|
||||
// A bug in orphan cleanup could be disastrous so let's only
|
||||
// run it in DEBUG builds for a few releases.
|
||||
//
|
||||
// TODO: Release to production once we have analytics.
|
||||
// TODO: Orphan cleanup is somewhat expensive - not least in doing a bunch
|
||||
// of disk access. We might want to only run it "once per version"
|
||||
// or something like that in production.
|
||||
[OWSOrphanedDataCleaner auditAndCleanupAsync:nil];
|
||||
#endif
|
||||
|
||||
[OWSProfileManager.sharedManager fetchLocalUsersProfile];
|
||||
[[OWSReadReceiptManager sharedManager] prepareCachedValues];
|
||||
[[Environment getCurrent].contactsManager loadLastKnownContactRecipientIds];
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#import "TSAccountManager.h"
|
||||
#import "TSNetworkManager.h"
|
||||
#import <SignalServiceKit/AppVersion.h>
|
||||
#import <SignalServiceKit/OWSOrphanedDataCleaner.h>
|
||||
|
||||
#define NEEDS_TO_REGISTER_PUSH_KEY @"Register For Push"
|
||||
#define NEEDS_TO_REGISTER_ATTRIBUTES @"Register Attributes"
|
||||
@ -79,17 +78,6 @@
|
||||
[self clearBloomFilterCache];
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
// A bug in orphan cleanup could be disastrous so let's only
|
||||
// run it in DEBUG builds for a few releases.
|
||||
//
|
||||
// TODO: Release to production once we have analytics.
|
||||
// TODO: Orphan cleanup is somewhat expensive - not least in doing a bunch
|
||||
// of disk access. We might want to only run it "once per version"
|
||||
// or something like that in production.
|
||||
[OWSOrphanedDataCleaner auditAndCleanupAsync:nil];
|
||||
#endif
|
||||
|
||||
[[[OWSDatabaseMigrationRunner alloc] initWithStorageManager:[TSStorageManager sharedManager]] runAllOutstanding];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user