Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
limbra
limbra
Commits
659afc2c
Commit
659afc2c
authored
Jan 19, 2021
by
LE GAC Renaud
Browse files
Update Msg and Automaton to add origin attribut
parent
dc5f3080
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
modules/harvest_tools/automaton.py
modules/harvest_tools/automaton.py
+3
-0
modules/harvest_tools/msg.py
modules/harvest_tools/msg.py
+5
-0
modules/store_tools/__init__.py
modules/store_tools/__init__.py
+1
-0
No files found.
modules/harvest_tools/automaton.py
View file @
659afc2c
...
...
@@ -11,6 +11,7 @@ from .msg import Msg
from
.msgcollection
import
MsgCollection
from
plugin_dbui
import
CALLBACK_ERRORS
,
get_id
from
store_tools
import
(
build_store
,
OAI
,
OAI_URL
,
StoreException
,
ToolException
)
...
...
@@ -477,6 +478,7 @@ class Automaton(object):
# start the log for the record
logs
.
append
(
Msg
(
harvester
=
harvester
,
collection
=
collection_logs
[
-
1
].
title
,
origin
=
record
.
oai
(),
record_id
=
record
.
id
(),
title
=
record
.
title
()))
...
...
@@ -535,6 +537,7 @@ class Automaton(object):
url
=
OAI_URL
%
(
harvester
.
host
,
rec_id
)
logs
.
append
(
Msg
(
harvester
=
harvester
,
collection
=
collection_logs
[
-
1
].
title
,
origin
=
OAI
%
(
harvester
.
host
,
rec_id
),
record_id
=
rec_id
,
title
=
url
))
logs
[
-
1
].
reject
(
e
)
...
...
modules/harvest_tools/msg.py
View file @
659afc2c
...
...
@@ -29,6 +29,9 @@ class Msg(Storage):
harvester (gluon.dal.Row):
the database harvester used to scan the store.
origin (str):
identify store(s) housing the publication
record_id (int):
the record identifier in the store.
...
...
@@ -40,6 +43,7 @@ class Msg(Storage):
def
__init__
(
self
,
collection
=
None
,
harvester
=
None
,
origin
=
None
,
record_id
=
None
,
title
=
None
):
...
...
@@ -51,6 +55,7 @@ class Msg(Storage):
else
:
self
.
harvester
=
json
.
dumps
(
harvester
.
as_dict
())
self
.
origin
=
origin
self
.
record_id
=
record_id
self
.
synonym
=
None
self
.
title
=
title
...
...
modules/store_tools/__init__.py
View file @
659afc2c
...
...
@@ -18,6 +18,7 @@ from .base import (ARXIV,
MSG_TOOMANY_SYNONYM
,
MSG_UNKNOWN_COLLABORATION
,
MSG_WELL_FORMED_COLLABORATION
,
OAI
,
OAI_URL
,
REG_ARXIV_NUMBER
,
REG_AUTHOR
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment