dont take screenshots for deleted sites

This commit is contained in:
Kyle Drake 2020-12-12 16:43:51 +00:00
parent 234df04300
commit 1260a856d5

View file

@ -31,6 +31,9 @@ class ScreenshotWorker
scheduled_job.delete scheduled_job.delete
end end
site = Site[username: username]
return if site.is_deleted
path = "/#{path}" unless path[0] == '/' path = "/#{path}" unless path[0] == '/'
uri = Addressable::URI.parse $config['screenshot_urls'].sample uri = Addressable::URI.parse $config['screenshot_urls'].sample