Skip to content

Commit

Permalink
#61 Improved resilience by randomizing the processing of journals
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Apr 8, 2024
1 parent c999d3f commit ea45965
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/tasks/Depositor.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ public function executeActions() {
$journalDao = DAORegistry::getDAO('JournalDAO');

// Get all journals
$journals = $journalDao->getAll(true);
$journals = $journalDao->getAll(true)->toArray();
shuffle($journals);

// For all journals
while ($journal = $journals->next()) {
foreach ($journals as $journal) {

// if the plugin isn't enabled for this journal, skip it
if (!$this->_plugin->getSetting($journal->getId(), 'enabled')) {
Expand Down

0 comments on commit ea45965

Please sign in to comment.