(auth: AuthDto, name: QueueName, dto: QueueUpdateDto)
| 156 | } |
| 157 | |
| 158 | async update(auth: AuthDto, name: QueueName, dto: QueueUpdateDto): Promise<QueueResponseDto> { |
| 159 | if (dto.isPaused === true) { |
| 160 | if (name === QueueName.BackgroundTask) { |
| 161 | throw new BadRequestException(`The BackgroundTask queue cannot be paused`); |
| 162 | } |
| 163 | await this.jobRepository.pause(name); |
| 164 | } |
| 165 | |
| 166 | if (dto.isPaused === false) { |
| 167 | await this.jobRepository.resume(name); |
| 168 | } |
| 169 | |
| 170 | return this.getByName(name); |
| 171 | } |
| 172 | |
| 173 | searchJobs(auth: AuthDto, name: QueueName, dto: QueueJobSearchDto): Promise<QueueJobResponseDto[]> { |
| 174 | return this.jobRepository.searchJobs(name, dto); |
no test coverage detected