Skip to content

Commit

Permalink
Merge branch 'develop' into feature-ezid-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rushirajnenuji committed Aug 8, 2023
2 parents 8007ebf + d8ffb98 commit cc0df77
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ templates/info/
\.pytest_cache/
.eggs/
pytest.ini
.test-venv
5 changes: 4 additions & 1 deletion ezidapp/management/commands/proc-crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Command(ezidapp.management.commands.proc_base.AsyncProcessingCommand):
name = __name__
setting = 'DAEMONS_CROSSREF_ENABLED'
queue = ezidapp.models.async_queue.CrossrefQueue
refIdentifier = ezidapp.models.identifier.RefIdentifier

def run(self):
"""Run async processing loop forever.
Expand Down Expand Up @@ -307,6 +308,7 @@ def check_status(self, task_model: ezidapp.models.async_queue.CrossrefQueue):
else:
task_model.status = self.queue.FAILURE
id_status = ezidapp.models.identifier.Identifier.CR_FAILURE
msg_str = self._oneLine(t[1]).strip()

task_model.message = msg_str

Expand All @@ -324,7 +326,8 @@ def check_status(self, task_model: ezidapp.models.async_queue.CrossrefQueue):
assert s.startswith('success:'), f'ezid.setMetadata failed: {s}'

if task_model.status in (self.queue.WARNING, self.queue.FAILURE):
u = ezidapp.models.util.getUserByPid(task_model.owner)
refOwner = ref_id.owner_id
u = ezidapp.models.util.getUserById(refOwner)
if u.crossrefEmail:
self._sendEmail(u.crossrefEmail, task_model)

Expand Down
3 changes: 2 additions & 1 deletion ezidapp/models/identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def __str__(self):
f'isDOI={self.isDoi}, '
f'isDataCite={self.isDatacite}, '
f'isCrossref={self.isCrossref}, '
f'target={self.target}'
f'target={self.target}, '
f'ownerId={self.owner_id}'
f')'
)

Expand Down

0 comments on commit cc0df77

Please sign in to comment.