Skip to content

Commit

Permalink
Made media urls work in celery workers, added docs for slackbot api (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
daveoconnor committed Jan 22, 2025
1 parent 7fa3dd4 commit 9c07e95
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ services:
networks:
- backend
environment:
LOCAL_DEVELOPMENT: "true"
DEBUG_TOOLBAR: "false"
env_file:
- .env
Expand Down
2 changes: 2 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ If both the `--release` and the `--library-name` are passed, the command will lo

**Purpose**: Execute a chain of commands which are necessary to run during a release. Imports new versions, beta versions, slack messages, github issues, commits, authors, maintainers, etc... Inspect the management command to see exactly which commands are being run.

For this to work `SLACK_BOT_API` must be set in the `.env` file.

**Example**

```bash
Expand Down
3 changes: 3 additions & 0 deletions docs/env_vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ This project uses environment variables to configure certain aspects of the appl
### `MAX_CELERY_CONNECTIONS`

- If set, will set the maximum number of connections to the Celery in `settings.py`. Defaults to 60.

### `SLACK_BOT_TOKEN`
- Used to authenticate with the Slack API for pulling data for release reports.
3 changes: 2 additions & 1 deletion env.template
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ GITHUB_OAUTH_CLIENT_SECRET=
GOOGLE_OAUTH_CLIENT_ID=
GOOGLE_OAUTH_CLIENT_SECRET=

SLACK_BOT_TOKEN=changeme
# optional, needed to run reports
SLACK_BOT_TOKEN=
DEBUG_TOOLBAR=True
# uncomment whichever is appropriate for your editor
# currently only pycharm is supported, vscode kept for example of alternative options
Expand Down
2 changes: 2 additions & 0 deletions libraries/management/commands/release_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def progress_message(message: str):

@locked(1138692)
def run_commands(progress: list[str]):
if not settings.SLACK_BOT_TOKEN:
raise ValueError("SLACK_BOT_TOKEN is not set.")
handled_commits = {}
progress.append(progress_message("Importing versions..."))
call_command("import_versions", "--new")
Expand Down

0 comments on commit 9c07e95

Please sign in to comment.