Browse Source

Maintenance: Removed deprecated Observers that have already been migrated to ActiveJob.

Thorsten Eckel 4 years ago
parent
commit
cf2a122217

+ 0 - 15
app/models/observer/chat/leave/background_job.rb

@@ -1,15 +0,0 @@
-class Observer::Chat::Leave::BackgroundJob
-  def initialize(chat_session_id, client_id, session)
-    @chat_session_id = chat_session_id
-    @client_id = client_id
-    @session = session
-  end
-
-  def perform
-    if Gem::Version.new(Version.get) >= Gem::Version.new('4.0.x')
-      ActiveSupport::Deprecation.warn("This file has been migrated to the ActiveJob 'ChatLeaveJob' and is therefore deprecated and should get removed.")
-    end
-
-    ChatLeaveJob.perform_now(@chat_session_id, @client_id, @session)
-  end
-end

+ 0 - 13
app/models/observer/ticket/article/communicate_facebook/background_job.rb

@@ -1,13 +0,0 @@
-class Observer::Ticket::Article::CommunicateFacebook::BackgroundJob
-  def initialize(id)
-    @article_id = id
-  end
-
-  def perform
-    if Gem::Version.new(Version.get) >= Gem::Version.new('4.0.x')
-      ActiveSupport::Deprecation.warn("This file has been migrated to the ActiveJob 'CommunicateFacebookJob' and is therefore deprecated and should get removed.")
-    end
-
-    CommunicateFacebookJob.perform_now(@article_id)
-  end
-end

+ 0 - 13
app/models/observer/ticket/article/communicate_sms/background_job.rb

@@ -1,13 +0,0 @@
-class Observer::Ticket::Article::CommunicateSms::BackgroundJob
-  def initialize(id)
-    @article_id = id
-  end
-
-  def perform
-    if Gem::Version.new(Version.get) >= Gem::Version.new('4.0.x')
-      ActiveSupport::Deprecation.warn("This file has been migrated to the ActiveJob 'CommunicateSmsJob' and is therefore deprecated and should get removed.")
-    end
-
-    CommunicateSmsJob.perform_now(@article_id)
-  end
-end

+ 0 - 13
app/models/observer/ticket/article/communicate_telegram/background_job.rb

@@ -1,13 +0,0 @@
-class Observer::Ticket::Article::CommunicateTelegram::BackgroundJob
-  def initialize(id)
-    @article_id = id
-  end
-
-  def perform
-    if Gem::Version.new(Version.get) >= Gem::Version.new('4.0.x')
-      ActiveSupport::Deprecation.warn("This file has been migrated to the ActiveJob 'CommunicateTelegramJob' and is therefore deprecated and should get removed.")
-    end
-
-    CommunicateTelegramJob.perform_now(@article_id)
-  end
-end

+ 0 - 13
app/models/observer/ticket/article/communicate_twitter/background_job.rb

@@ -1,13 +0,0 @@
-class Observer::Ticket::Article::CommunicateTwitter::BackgroundJob
-  def initialize(id)
-    @article_id = id
-  end
-
-  def perform
-    if Gem::Version.new(Version.get) >= Gem::Version.new('4.0.x')
-      ActiveSupport::Deprecation.warn("This file has been migrated to the ActiveJob 'CommunicateTwitterJob' and is therefore deprecated and should get removed.")
-    end
-
-    CommunicateTwitterJob.perform_now(@article_id)
-  end
-end

+ 0 - 30
app/models/transaction/background_job.rb

@@ -1,30 +0,0 @@
-class Transaction::BackgroundJob
-  def initialize(item, params = {})
-
-=begin
-  {
-    object: 'Ticket',
-    type: 'update',
-    ticket_id: 123,
-    interface_handle: 'application_server', # application_server|websocket|scheduler
-    changes: {
-      'attribute1' => [before,now],
-      'attribute2' => [before,now],
-    },
-    created_at: Time.zone.now,
-    user_id: 123,
-  },
-=end
-
-    @item = item
-    @params = params
-  end
-
-  def perform
-    if Gem::Version.new(Version.get) >= Gem::Version.new('4.0.x')
-      ActiveSupport::Deprecation.warn("This file has been migrated to the ActiveJob 'TransactionJob' and is therefore deprecated and should get removed.")
-    end
-
-    TransactionJob.perform_now(@item, @params)
-  end
-end