Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 659afc2c authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update Msg and Automaton to add origin attribut

parent dc5f3080
......@@ -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)
......
......@@ -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
......
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment