Skip to content

Commit

Permalink
fix: adjusting the task for 3:00 am
Browse files Browse the repository at this point in the history
  • Loading branch information
juanky201271 committed Feb 13, 2024
1 parent a6c1473 commit 5bae067
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ios/ZingoMobile/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ - (void)startBackgroundTask:(NSString *)noValue {
bgTask.expirationHandler = ^{
NSLog(@"BGTask startBackgroundTask - expirationHandler called");
// interrupting the sync process, I can't wait to see if the process is over
// because I have no time enough to run all of this task
// because I have no time enough to run all of this task here.
char *resp2 = execute("interrupt_sync_after_batch", "true");
NSString* respStr2 = [NSString stringWithUTF8String:resp2];
NSLog(@"BGTask startBackgroundTask - expirationHandler interrupt syncing %@", respStr2);
Expand Down Expand Up @@ -350,12 +350,12 @@ - (void)scheduleBackgroundTask {
NSDate *earlyMorning = [[NSCalendar currentCalendar] dateByAddingComponents:earlyMorningComponent toDate:tomorrow options:0];

// DEVELOPMENT
NSDate *now = [NSDate date];
//NSDate *now = [NSDate date];

NSDate *twoMinutesLater = [now dateByAddingTimeInterval:120]; // 2 minutes = 120 seconds
//NSDate *twoMinutesLater = [now dateByAddingTimeInterval:120]; // 2 minutes = 120 seconds

//request.earliestBeginDate = earlyMorning;
request.earliestBeginDate = twoMinutesLater;
request.earliestBeginDate = earlyMorning;
//request.earliestBeginDate = twoMinutesLater;
request.requiresExternalPower = YES;
request.requiresNetworkConnectivity = YES;

Expand Down

0 comments on commit 5bae067

Please sign in to comment.