Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow manually republishing thesis in Pending publication status #1309

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,15 @@ Note the `-s` option on the second command, which sets the dyno size for the run

### Publishing a single thesis

You can publish a single thesis that is already in `Publication review` status by passing the `thesis_id` to a rake
You can publish a single thesis that is already in `Publication review` or `Pending publication` status by passing the `thesis_id` to a rake
task:

```shell
heroku run -s standard-2x rails dss:publish_thesis_by_id[THESIS_ID] --app TARGET-HEROKU-APP
```

Note: `Pending publication` is allowed here, but not expected to be a normal occurence, to handle the edge case of the app thinking data was sent to SQS but the data not arriving for any reason.

## Preservation workflow

The publishing workflow will automatically trigger preservation for all of the published theses in the results queue.
Expand Down
4 changes: 3 additions & 1 deletion lib/tasks/dss.rake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ namespace :dss do
thesis = Thesis.find(args.thesis_id)

# Our publication job expects to be only sent theses that are ready to be published so we need to check here
if thesis.publication_status == 'Publication review'
# `Publication review` is the normal status for theses entering this process, but we also allow
# `Pending publication` to allow us to bump jobs that didn't make it to the SQS queue for any reason.
if ['Publication review', 'Pending publication'].include?(thesis.publication_status)
DspacePublicationJob.perform_now(thesis)
else
Rails.logger.info("Thesis status of #{thesis.publication_status} is not publishable.")
Expand Down
Loading