mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-03-02 04:09:58 +00:00
Provide rough draft of better project organization
This commit is contained in:
13
src/invidious/jobs.cr
Normal file
13
src/invidious/jobs.cr
Normal 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
|
||||
Reference in New Issue
Block a user