ArchiveTeam / ArchiveBot

ArchiveBot, an IRC bot for archiving websites
http://www.archiveteam.org/index.php?title=ArchiveBot
MIT License
359 stars 71 forks source link

!aborting a job which is currently in the queue should kill the job immediately #267

Open JustAnotherArchivist opened 7 years ago

JustAnotherArchivist commented 7 years ago

Recently, I submitted a job but forgot some options. I !aborted the job, but this did not have any effect until several hours later. At the time of the submission, all pipelines were either busy or broken, so the job only started hours later and was then aborted immediately. Instead, I would expect a job in the queue to be killed (= removed from the queue) immediately on !abort as there is likely no special treatment necessary if the job hasn't started yet.

falconkirtaran commented 7 years ago

When we support more frontends, this will bloat their complexity a little (find and delete jobs that are in the pending queues and about to be aborted). However, if we want to add more logic like this, it may actually be better to create an API instead of what we're currently doing.

This is a good point; having the pipelines do this work certainly works, but is wasteful and annoying compared to just dropping the redis entry.