Provide rough draft of better project organization

This commit is contained in:
Matthew McGarvey
2020-10-05 23:41:18 -05:00
parent 1978c3d3bd
commit 85c212aee3
9 changed files with 115 additions and 43 deletions

13
src/invidious/jobs.cr Normal file
View File

@@ -0,0 +1,13 @@
module Invidious::Jobs
JOBS = [] of BaseJob
def self.register(job : BaseJob)
JOBS << job
end
def self.start_all
JOBS.each do |job|
spawn { job.begin }
end
end
end