metasmoke icon indicating copy to clipboard operation
metasmoke copied to clipboard

Move all threading to use ActiveJob instead

Open thesecretmaster opened this issue 4 years ago • 1 comments

It appears that the old weird CI issues were caused by us calling Thread.new in various places. Really, everywhere we do that, we should either not be doing that or be using ActiveJob. This issue is to eliminate all uses of Thread.new in MS and replace them with calls to ActiveJob.

thesecretmaster avatar Jul 06 '20 19:07 thesecretmaster

There are 4 remaining instances of Thread.new:

  • AuthenticationController#send_invalidations: This should probably not be in a thread, we want to be able to forward the status of the invalidations to the user instead of just saying they were "queued". Maybe the token store needs to be able to do bulk invalidations.
  • StackExchangeUsersController#update_data: This should become a job, I just have weird feelings about it because it does HTTP requests.
  • PostConcerns#spam_wave_autoflag: This should almost certainly just be a job, the problem is that the logs would get eaten up by workers, and I think we want those logs.
  • Feedback, after_save callback: Again, should prolly be a job, just gives me weird feelings. Maybe because of actioncable stuff.

thesecretmaster avatar Aug 25 '20 14:08 thesecretmaster