Skip to content

ocf/create

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6553af9 · Apr 20, 2025
Apr 19, 2025
Apr 20, 2025
Nov 29, 2016
Mar 5, 2017
Mar 15, 2020
Jul 20, 2016
Jul 20, 2016
Nov 29, 2016
Apr 26, 2019
Apr 24, 2019
Apr 20, 2025
Apr 19, 2025
Aug 1, 2020
Apr 7, 2020
Mar 8, 2020
Jul 31, 2020
Jun 4, 2020
Feb 2, 2020
Jun 4, 2020
Apr 19, 2025
Apr 19, 2025
Oct 6, 2017
Aug 17, 2015

Repository files navigation

create

Build Status Checked with mypy

Celery worker for account creation

Development

Clone the repo, and run make venv inside the repository directory. This will install the required python packages needed to run create.

The worker is run in production as a systemd service, but for development you probably want to just run them manually using the commands explained below. Be aware that if you start the celery worker but another is already running, you aren't guaranteed that tasks will land on your instance.

To run the bot, first you must be on supernova, since the credentials are only accessible from there. Then, after installing the packages required, source the virtualenv (source .activate.sh) to enable the commands to use for running the celery worker. To automatically source and unsource the virtualenv when entering/leaving the directory, try using aactivator.

To start the celery worker, run python -m create.worker --debug. The celery worker will by default use the config file already on supernova, but you can specify your own config file to use for development with the -c or --config parameter to either one. More help is available with -h or --help. To exit the virtualenv when you are done working on create, just type deactivate.

When running with --debug, your celery worker will only listen on a queue named after the hostname it runs on. This means that your worker won't serve real tasks (e.g. users using prod ocfweb), and that you can always hit your worker by specifying the right queue (e.g. supernova).