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

wip

parent fc970ebe
No related branches found
No related tags found
No related merge requests found
......@@ -8,15 +8,27 @@ module Research::Hal
def self.update_from_api!
begin
Research::Hal::Publication.skip_callback :save, :after, :connect_and_sync_direct_sources
pause_git_sync
Research::Hal::Author.find_each do |author|
author.import_research_hal_publications!
end
ensure
Research::Hal::Publication.set_callback :save, :after, :connect_and_sync_direct_sources
unpause_git_sync
end
end
def self.pause_git_sync
Research::Hal::Publication.skip_callback :save, :after, :connect_and_sync_direct_sources
end
def self.unpause_git_sync
Research::Hal::Publication.set_callback :save, :after, :connect_and_sync_direct_sources
end
def self.clear_queue
# TODO
end
def self.parts
[
[Research::Hal::Publication, :admin_research_hal_publications_path],
......
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