diff --git a/src/app/core/services/schedule/schedule-factory.service.ts b/src/app/core/services/schedule/schedule-factory.service.ts index 97683a1cc..61bbf555b 100644 --- a/src/app/core/services/schedule/schedule-factory.service.ts +++ b/src/app/core/services/schedule/schedule-factory.service.ts @@ -18,7 +18,7 @@ export class ScheduleFactoryService extends ScheduleService { constructor( public localScheduleService: LocalScheduleService, - public appServerScheduleSerice: AppserverScheduleService, + public appServerScheduleService: AppserverScheduleService, private remoteConfig: RemoteConfigService, private store: GlobalStorageService, logger: LogService @@ -40,7 +40,7 @@ export class ScheduleFactoryService extends ScheduleService { case SchedulerType.LOCAL: return (this.scheduleService = this.localScheduleService) case SchedulerType.APPSERVER: - return (this.scheduleService = this.appServerScheduleSerice) + return (this.scheduleService = this.appServerScheduleService) default: throw new Error('No such scheduling service available') } @@ -75,6 +75,6 @@ export class ScheduleFactoryService extends ScheduleService { } updateTaskToComplete(updatedTask): Promise { - return this.scheduleService.updateTaskToComplete(updatedTask) + return this.appServerScheduleService.updateTaskToComplete(updatedTask) } } diff --git a/src/app/pages/questions/services/finish-task.service.ts b/src/app/pages/questions/services/finish-task.service.ts index 21c4091e1..6ad588872 100644 --- a/src/app/pages/questions/services/finish-task.service.ts +++ b/src/app/pages/questions/services/finish-task.service.ts @@ -36,8 +36,7 @@ export class FinishTaskService { : [], this.kafka .prepareKafkaObjectAndStore(SchemaType.TIMEZONE, {}) - .then(() => this.kafka.sendAllFromCache()), - this.cancelNotificationsForCompletedTask(task) + .then(() => this.kafka.sendAllFromCache()) ]) } @@ -61,11 +60,4 @@ export class FinishTaskService { ) .then(() => this.config.rescheduleNotifications()) } - // TODO process for general questionnaire schema - - cancelNotificationsForCompletedTask(task): Promise { - console.log('Cancelling pending reminders for task..') - const notifications = task.notifications ? task.notifications : [] - return notifications.forEach(n => this.config.cancelSingleNotification(n)) - } }