Skip to content

Commit 57319df

Browse files
committed
Added a class-level docstring
1 parent 75d827c commit 57319df

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

osf/management/commands/resync_preprint_dois_v1.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,22 @@ def resync_preprint_dois_v1(dry_run=True, batch_size=500, rate_limit=100, provid
9494
f'{"[DRY RUN] " if dry_run else ""}'
9595
f'Done: {queued} preprints queued, {skipped} skipped (no DOI prefix), {errored} errored'
9696
)
97+
if not dry_run and batch_size:
98+
logger.info(
99+
f'Estimated remaining after this batch: ~{max(0, total - queued - skipped - errored)}. '
100+
f'Re-run this command until 0 preprints remain.'
101+
)
97102

98103

99104
class Command(BaseCommand):
105+
help = (
106+
'Resync DOIs for version-1 preprints that are missing the versioned DOI suffix (_v1). '
107+
'Processes preprints in batches and queues Crossref deposit tasks. '
108+
'IMPORTANT: This command must be run repeatedly until it reports 0 preprints remaining, '
109+
'as each run only processes a single batch. '
110+
'Check remaining count with --dry_run before and after each run.'
111+
)
112+
100113
def add_arguments(self, parser):
101114
super().add_arguments(parser)
102115
parser.add_argument(

0 commit comments

Comments
 (0)