code: def pause_task(self, row, scan=True):
          '''暂停下载任务'''
          if row[STATE_COL] == State.UPLOADING:
              self.remove_worker(row[FID_COL], stop=False)
          if row[STATE_COL] in (State.UPLOADING, State.WAITING):
              row[STATE_COL] = State.PAUSED
              row[STATENAME_COL] = StateNames[State.PAUSED]
              self.update_task_db(row)
              if scan:
                  self.scan_tasks(f pause_task(self, row, scan=True):
          '''暂停下载任务'''
          if row[STATE_COL] == State.UPLOADING:
              self.remove_worker(row[FID_COL], stop=False)
          if row[STATE_COL] in (State.UPLOADING, State.WAITING):
              row[STATE_COL] = State.PAUSED
              row[STATENAME_COL] = StateNames[State.PAUSED]
              self.update_task_db(row)
              if scan:
                  self.scan_tasks()
docs: 暂停下载任务