Skip to content

Commit e34910d

Browse files
authored
Merge pull request #1295 from MITLibraries/etd-598-publishing-memory-spikes
Add heroku scaling commands to publication process
2 parents 81d1964 + c041bcd commit e34910d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,21 @@ Publication Review - Publish)
365365
[DSS repo](https://github.com/MITLibraries/dspace-submission-service#run-stage))
366366
4. ETD processes output queue to update records and send email to stakeholders with summary data and list
367367
of any error records. As of now this is a manual process, but can be triggered via rake task using the following
368-
Heroku run command:
368+
sequence of heroku-cli commands:
369369

370370
```shell
371+
# scale the worker dyno to ensure we have enough memory
372+
heroku ps:scale worker=1:standard-2x --app TARGET-HEROKU-APP
373+
374+
# run the output queue processing job
371375
heroku run -s standard-2x rails dss:process_output_queue --app TARGET-HEROKU-APP
376+
377+
# wait for all ETD emails to be received (the preservation email is the final one to look for)
378+
# scale the worker back down so we do not pay for more CPU/memory than we need
379+
heroku ps:scale worker=1:standard-1x --app TARGET-HEROKU-APP
372380
```
373381

374-
Note the `-s` option, which sets the dyno size for the run command. We are scaling to the larger '2X' dyno because
375-
this job is very memory-intensive.
382+
Note the `-s` option on the second command, which sets the dyno size for the run command. We are scaling to the larger '2X' dyno because this job is very memory-intensive. We also first scale the worker dyno to 2x and then set it back to 1x when we are done for the same reason (preservation takes a lot of memory).
376383

377384
### Publishing a single thesis
378385

0 commit comments

Comments
 (0)