Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
29d31732
Unverified
Commit
29d31732
authored
5 months ago
by
Sébastien Gaya
Committed by
GitHub
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix cron task name + connect publications to researchers after importing them from authors (#2318)
parent
884ebd63
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/models/research/hal.rb
+3
-0
3 additions, 0 deletions
app/models/research/hal.rb
app/models/university/person/with_research.rb
+10
-0
10 additions, 0 deletions
app/models/university/person/with_research.rb
cron.json
+1
-1
1 addition, 1 deletion
cron.json
with
14 additions
and
1 deletion
app/models/research/hal.rb
+
3
−
0
View file @
29d31732
...
...
@@ -12,6 +12,9 @@ module Research::Hal
Research
::
Hal
::
Author
.
find_each
do
|
author
|
author
.
import_research_hal_publications!
end
University
::
Person
.
joins
(
:research_hal_authors
).
distinct
.
find_each
do
|
person
|
person
.
connect_research_hal_publications!
end
ensure
unpause_git_sync
end
...
...
This diff is collapsed.
Click to expand it.
app/models/university/person/with_research.rb
+
10
−
0
View file @
29d31732
...
...
@@ -33,6 +33,7 @@ module University::Person::WithResearch
scope
:with_hal_identifier
,
->
{
where
.
not
(
hal_form_identifier:
[
nil
,
''
])
}
end
# Import HAL publications by retrieving them from API
def
import_research_hal_publications!
publications
.
delete
(
publications
.
hal
)
hal_authors
.
each
do
|
author
|
...
...
@@ -41,4 +42,13 @@ module University::Person::WithResearch
end
end
# Connect HAL publications from HAL authors without calling the API
def
connect_research_hal_publications!
publications
.
delete
(
publications
.
hal
)
hal_authors
.
each
do
|
author
|
# TODO manage same researcher in different universities
publications
.
concat
author
.
publications
end
end
end
This diff is collapsed.
Click to expand it.
cron.json
+
1
−
1
View file @
29d31732
{
"jobs"
:
[
{
"command"
:
"0 1 * * * rails auto:update_
publications_from_
hal"
,
"command"
:
"0 1 * * * rails auto:update_hal"
,
"size"
:
"L"
},
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment