Skip to content

Commit 5aa22e3

Browse files
authored
Merge pull request #1309 from MITLibraries/bump-publish
Allow manually republishing thesis in `Pending publication` status
2 parents ca4f371 + de700ad commit 5aa22e3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,15 @@ Note the `-s` option on the second command, which sets the dyno size for the run
383383

384384
### Publishing a single thesis
385385

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

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

393+
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.
394+
393395
## Preservation workflow
394396

395397
The publishing workflow will automatically trigger preservation for all of the published theses in the results queue.

lib/tasks/dss.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ namespace :dss do
1111
thesis = Thesis.find(args.thesis_id)
1212

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

0 commit comments

Comments
 (0)