Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

遍历删除多个状态的普通任务没有全部删除 #427

Closed
gaosiling opened this issue Jul 21, 2019 · 6 comments

Comments

@gaosiling
Copy link

commented Jul 21, 2019

Aria版本

implementation 'com.arialyy.aria:aria-core:3.6.5'
annotationProcessor 'com.arialyy.aria:aria-compiler:3.6.5'

什么问题

Q1: 配置maxTaskNum没有生效。
Q2: 遍历删除多个状态的普通任务,并没有全部删除掉。

如何复现此问题

Q1: aria_config.xml中 没有生效。
Q2: 添加2个任务后,任务1状态running,任务2状态wait,选择这2个任务通过遍历调用cancel(true)删除;通过getTaskList();获取已完成和未完成的普通任务,任务2仍存在,并没有删除掉。

控制台日志

image

@gaosiling

This comment has been minimized.

Copy link
Author

commented Jul 21, 2019

什么时候可以修复呢?或者您建议我怎么处理?

@AriaLyy AriaLyy added the bug label Jul 22, 2019

@AriaLyy

This comment has been minimized.

Copy link
Owner

commented Jul 22, 2019

        List<DownloadEntity> entities = Aria.download(this).getTaskList();
        for (DownloadEntity entity: entities){
          Aria.download(this).load(entity.getUrl()).cancel(true);
          ALog.d(TAG, "exist ==" + Aria.download(this).load(entity.getUrl()).taskExists());
        }

这种删除方式有问题,原因待排查,如果需要删除全部任务,可以使用以下的删除方式

        Aria.download(this).removeAllTask(true);
@gaosiling

This comment has been minimized.

Copy link
Author

commented Jul 22, 2019

我这删除全部是没有问题的, 但是删除其中的几个会出现这个问题,这个要怎么处理可以实现,我没有找到别的方法

@gaosiling

This comment has been minimized.

Copy link
Author

commented Jul 22, 2019

或者可以加一个删除多个任务的方法

@AriaLyy

This comment has been minimized.

Copy link
Owner

commented Jul 22, 2019

原因是3.6.5版本后添加了一个调用命令间隔的限制,后面考虑将停止和删除的间隔限制去掉
image
image

AriaLyy added a commit that referenced this issue Jul 22, 2019

@AriaLyy AriaLyy changed the title 配置maxTaskNum没有生效, 遍历删除多个状态的普通任务没有全部删除 遍历删除多个状态的普通任务没有全部删除 Jul 24, 2019

@AriaLyy

This comment has been minimized.

Copy link
Owner

commented Jul 24, 2019

3.6.6_beta_1已经修复了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.