mirror of
https://github.com/iv-org/invidious.git
synced 2025-09-15 00:08:30 +00:00
set Log in inherithed macro for BaseJob subclasses
This commit is contained in:
parent
882bb98e01
commit
d0cd940893
@ -6,6 +6,8 @@ abstract class Invidious::Jobs::BaseJob
|
||||
# and to create the associated instance property.
|
||||
#
|
||||
macro inherited
|
||||
Log = ::Log.for(self)
|
||||
|
||||
macro finished
|
||||
# This config structure can be expanded as required.
|
||||
struct Config
|
||||
|
@ -1,6 +1,4 @@
|
||||
class Invidious::Jobs::ClearExpiredItemsJob < Invidious::Jobs::BaseJob
|
||||
Log = ::Log.for(self)
|
||||
|
||||
# Remove items (videos, nonces, etc..) whose cache is outdated every hour.
|
||||
# Removes the need for a cron job.
|
||||
def begin
|
||||
|
@ -1,6 +1,4 @@
|
||||
class Invidious::Jobs::InstanceListRefreshJob < Invidious::Jobs::BaseJob
|
||||
Log = ::Log.for(self)
|
||||
|
||||
# We update the internals of a constant as so it can be accessed from anywhere
|
||||
# within the codebase
|
||||
#
|
||||
|
@ -22,8 +22,6 @@ struct VideoNotification
|
||||
end
|
||||
|
||||
class Invidious::Jobs::NotificationJob < Invidious::Jobs::BaseJob
|
||||
Log = ::Log.for(self)
|
||||
|
||||
private getter notification_channel : ::Channel(VideoNotification)
|
||||
private getter connection_channel : ::Channel({Bool, ::Channel(PQ::Notification)})
|
||||
private getter pg_url : URI
|
||||
|
@ -1,6 +1,4 @@
|
||||
class Invidious::Jobs::RefreshChannelsJob < Invidious::Jobs::BaseJob
|
||||
Log = ::Log.for(self)
|
||||
|
||||
private getter db : DB::Database
|
||||
|
||||
def initialize(@db)
|
||||
|
@ -1,6 +1,4 @@
|
||||
class Invidious::Jobs::RefreshFeedsJob < Invidious::Jobs::BaseJob
|
||||
Log = ::Log.for(self)
|
||||
|
||||
private getter db : DB::Database
|
||||
|
||||
def initialize(@db)
|
||||
|
@ -1,6 +1,4 @@
|
||||
class Invidious::Jobs::SubscribeToFeedsJob < Invidious::Jobs::BaseJob
|
||||
Log = ::Log.for(self)
|
||||
|
||||
private getter db : DB::Database
|
||||
private getter hmac_key : String
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user