Skip to content

Commit

Permalink
Ready 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
CoffeePerry committed Nov 28, 2020
1 parent 0737cb9 commit 978616f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ See the *RabbitMQ* *Admin Guide* for more information about access control
Copy and paste file **config-\*.py**, from folder **configs**, into folder **mercury-instance**
and modify it according to your needs.

#### Configure the Secret Key
SECRET_KEY should be changed to some random bytes in production.

You can use the following command to output a random secret key:
~~~
$ python -c 'import os; print(os.urandom(16))'
~~~

Then place returned value into your **config.py**.

### **Note**: *Windows* Systems

On *Windows* systems, an additional dependency must be installed in order for Celery-based submodules to function
Expand Down
6 changes: 6 additions & 0 deletions mercury/services/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ def init_app(app):
if not path.isdir(celery_beat_folder):
makedirs(celery_beat_folder)
raise Exception(f'Directory not found, so just created: {celery_beat_folder}')
except OSError as ex:
app.logger.error(str(ex))
except Exception as ex:
app.logger.exception(str(ex))

try:
# Ensure the celery logs folder exists
celery_logs_folder = path.join(app.instance_path, app.config['CELERY_LOGS_FOLDER'])
if not path.isdir(celery_logs_folder):
Expand Down
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[metadata]
description-file = README.md

[egg_info]
tag_build = .dev
tag_date = 1

[aliases]
release = egg_info -Db ''
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
packages=find_packages(include=['mercury']),
package_data={'mercury': ['static/favicon.ico']},
include_package_data=True,
zip_safe=False,
version=version,
description='mercury-py (Mercury for Python) is a Python based microservice that allow to manage scheduled '
'notifications sending.',
Expand Down

0 comments on commit 978616f

Please sign in to comment.