Skip to content

Commit

Permalink
Send user name during send_archive_next from server config file, and …
Browse files Browse the repository at this point in the history
…don't overwrite in the catalog
  • Loading branch information
nmassey001 committed Feb 4, 2025
1 parent af19cb8 commit d71472b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nlds_processors/archive/send_archive_next.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def send_archive_next():
MSG.SECRET_KEY: None,
MSG.TAPE_URL: None,
MSG.TENANCY: None,
MSG.USER: "admin-placeholder",
MSG.GROUP: "admin-placeholder"
}
# Load any cronjob config, if present
cronjob_config = DEFAULT_CONFIG
Expand All @@ -40,8 +42,6 @@ def send_archive_next():
MSG.DETAILS: {
MSG.TRANSACT_ID: str(uuid4()),
MSG.SUB_ID: str(uuid4()),
MSG.USER: "admin-placeholder",
MSG.GROUP: "admin-placeholder",
MSG.TARGET: None,
MSG.API_ACTION: "archive-put",
MSG.JOB_LABEL: "archive-next",
Expand Down
4 changes: 2 additions & 2 deletions nlds_processors/catalog/catalog_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,8 @@ def _catalog_archive_put(self, body: Dict, rk_origin: str) -> None:
# Forward successful file details to archive for tape write
rk_complete = ".".join([rk_origin, RK.CATALOG_ARCHIVE_NEXT, RK.COMPLETE])

body[MSG.DETAILS][MSG.USER] = next_holding.user
body[MSG.DETAILS][MSG.GROUP] = next_holding.group
# the user and group should be set as the NLDS user by the send_archive_next
# cronjob publisher
body[MSG.META][MSG.HOLDING_ID] = next_holding.id
if len(self.completelist) > 0:
self.log(
Expand Down

0 comments on commit d71472b

Please sign in to comment.