Skip to content
Snippets Groups Projects
Commit 2d610a29 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Merge branch 'main' of github.com:osunyorg/admin

parents abf3e8bc 5cb7f01b
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@ class Communication::Website::BaseJob < ApplicationJob
queue_as :elephant
discard_on ActiveJob::DeserializationError
attr_accessor :website_id
def perform(website_id)
......
class Communication::Website::DeleteObsoleteConnectionsJob < Communication::Website::BaseJob
queue_as :mice
def execute
website.delete_obsolete_connections
end
......
class Communication::Website::DirectObject::SyncWithGitJob < ApplicationJob
queue_as :elephant
class Communication::Website::DirectObject::SyncWithGitJob < Communication::Website::BaseJob
def perform(direct_object)
direct_object.sync_with_git_safely
end
......
class Communication::Website::IndirectObject::SyncWithGitJob < ApplicationJob
queue_as :elephant
class Communication::Website::IndirectObject::SyncWithGitJob < Communication::Website::BaseJob
def perform(website, indirect_object)
website.sync_indirect_object_with_git(indirect_object)
end
......
......@@ -47,6 +47,7 @@ module Communication::Website::WithGitRepository
end
def destroy_obsolete_git_files_safely
return unless should_sync_with_git?
website_git_files.find_each do |git_file|
dependency = git_file.about
# Here, dependency can be nil (object was previously destroyed)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment