Rename method.
Add cancel all jobs API.
Name a task.
Add new constants.
Change delay time when indexing resources.
Remove unneeded statement.
Always cancel current tasks before starting new ones.
Rename methods
Add new constant APIs.
Cancel all jobs when shutting down the plugin.
Always cancel current tasks before starting new ones.
Wait a second before indexing resources.

Prevents possible race conditions and unnecessary processing.
Add new API constants.
Refactor method name.
Name event handlers appropriately.