Skip to content

Commit

Permalink
removed trash comment; added nofification about env
Browse files Browse the repository at this point in the history
  • Loading branch information
MajoBerger committed Mar 18, 2024
1 parent 8051c8c commit 324a4ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tools/create_bitstreams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ How to run the script:
- Run `pip install -r requirements.txt`
- Update `project_settings.py`
- Run `python create_bitstreams.py`

### Override endpoint
If there is env DSPACE_REST_API, it is used as `env.backend.endpoint`.
8 changes: 6 additions & 2 deletions tools/create_bitstreams/create_bitstreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@

# env settings, update with project_settings
env = update_settings(settings.env, project_settings.settings)
# abcd = os.getenv(")
init_logging(_logger, env["log_file"])

if "DSPACE_REST_API" in os.environ:
env["backend"]["endpoint"] = os.getenv("DSPACE_REST_API")
init_logging(_logger, env["log_file"])
env_backend_endpoint = env["backend"]["endpoint"]
_logger.info(f"Loaded env.backend.endpoint from env DSPACE_REST_API."
f" Current value: {env_backend_endpoint}")


MULTIPART_CONTENT_TYPE = 'multipart/form-data'
COPIES_COUNT = 20
Expand Down

0 comments on commit 324a4ad

Please sign in to comment.