Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
83246553
authored
Dec 01, 2026
by
Szeberényi Imre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prod conf/saml & QRcode fix
parent
212cdb38
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
106 additions
and
83 deletions
+106
-83
circle/celeryconfig.py
+24
-1
circle/circle/settings/base.py
+23
-18
circle/circle/settings/production.py
+46
-53
circle/dashboard/templates/dashboard/enable-two-factor.html
+2
-1
circle/manager/mancelery.py
+3
-3
circle/manager/moncelery.py
+3
-3
circle/manager/slowcelery.py
+3
-3
requirements/base.txt
+2
-1
No files found.
circle/celeryconfig.py
View file @
83246553
#
#
CELERY_RESULT_BACKEND
=
'amqp://'
CELERY_TASK_RESULT_EXPIRES
=
300
CELERY_TASK_RESULT_EXPIRES
=
300
CELERY_TIMEZONE
=
'UTC'
CELERY_TIMEZONE
=
'UTC'
CELERY_ENABLE_UTC
=
True
CELERY_ENABLE_UTC
=
True
...
@@ -7,4 +6,28 @@ CELERY_ACCEPT_CONTENT = ['json', 'pickle_v2', 'pickle']
...
@@ -7,4 +6,28 @@ CELERY_ACCEPT_CONTENT = ['json', 'pickle_v2', 'pickle']
CELERY_TASK_SERIALIZER
=
'json'
CELERY_TASK_SERIALIZER
=
'json'
CELERY_RESULT_SERIALIZER
=
'pickle'
CELERY_RESULT_SERIALIZER
=
'pickle'
CELERY_STORE_ERRORS_EVEN_IF_IGNORED
=
True
CELERY_STORE_ERRORS_EVEN_IF_IGNORED
=
True
CELERY_RESULT_BACKEND
=
'amqp://'
import
os
from
logging
import
getLogger
logger
=
getLogger
(
__name__
)
CIRCLE_MAINTENANCE
=
os
.
environ
.
get
(
'CIRCLE_MAINTENANCE'
,
'false'
)
.
lower
()
in
(
'true'
,
'1'
,
'yes'
)
def
maintenance_schedule
(
schedule
):
"""Disable potentially destructive periodic tasks in maintenance mode."""
if
CIRCLE_MAINTENANCE
:
logger
.
error
(
"!!! Maintanence mode ON !!!"
)
for
task_name
in
(
'storage.periodic_tasks'
,
'vm.garbage_collector'
,
'dashboard.send_email_notifications'
,
'vm.local_periodic_tasks'
,
):
schedule
.
pop
(
task_name
,
None
)
return
schedule
circle/circle/settings/base.py
View file @
83246553
...
@@ -111,7 +111,8 @@ try:
...
@@ -111,7 +111,8 @@ try:
except
:
except
:
systz
=
None
systz
=
None
TIME_ZONE
=
'UTC'
#get_env_variable('DJANGO_TIME_ZONE', default=systz)
#TIME_ZONE = 'UTC' #get_env_variable('DJANGO_TIME_ZONE', default=systz)
TIME_ZONE
=
get_env_variable
(
'DJANGO_TIME_ZONE'
,
'UTC'
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code
# See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code
LANGUAGE_CODE
=
get_env_variable
(
"DJANGO_LANGUAGE_CODE"
,
"en"
)
LANGUAGE_CODE
=
get_env_variable
(
"DJANGO_LANGUAGE_CODE"
,
"en"
)
...
@@ -150,19 +151,6 @@ MEDIA_URL = get_env_variable('DJANGO_MEDIA_URL', default='/media/')
...
@@ -150,19 +151,6 @@ MEDIA_URL = get_env_variable('DJANGO_MEDIA_URL', default='/media/')
STATIC_ROOT
=
normpath
(
join
(
SITE_ROOT
,
'static_collected'
))
STATIC_ROOT
=
normpath
(
join
(
SITE_ROOT
,
'static_collected'
))
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL
=
get_env_variable
(
'DJANGO_STATIC_URL'
,
default
=
'/static_collected/'
)
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
STATICFILES_FINDERS
=
(
'django.contrib.staticfiles.finders.FileSystemFinder'
,
'django.contrib.staticfiles.finders.AppDirectoriesFinder'
,
'pipeline.finders.PipelineFinder'
,
)
########## STATIC FILE CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
STATIC_ROOT
=
normpath
(
join
(
SITE_ROOT
,
'static_collected'
))
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL
=
get_env_variable
(
'DJANGO_STATIC_URL'
,
default
=
'/static/'
)
STATIC_URL
=
get_env_variable
(
'DJANGO_STATIC_URL'
,
default
=
'/static/'
)
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
...
@@ -334,6 +322,7 @@ MIDDLEWARE = (
...
@@ -334,6 +322,7 @@ MIDDLEWARE = (
# Default Django middleware.
# Default Django middleware.
'django.middleware.common.CommonMiddleware'
,
'django.middleware.common.CommonMiddleware'
,
'django.contrib.sessions.middleware.SessionMiddleware'
,
'django.contrib.sessions.middleware.SessionMiddleware'
,
'djangosaml2.middleware.SamlSessionMiddleware'
,
# ÚJ
'django.middleware.locale.LocaleMiddleware'
,
'django.middleware.locale.LocaleMiddleware'
,
'django.middleware.csrf.CsrfViewMiddleware'
,
'django.middleware.csrf.CsrfViewMiddleware'
,
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
...
@@ -381,6 +370,7 @@ THIRD_PARTY_APPS = (
...
@@ -381,6 +370,7 @@ THIRD_PARTY_APPS = (
'pipeline'
,
'pipeline'
,
'rest_framework'
,
'rest_framework'
,
'rest_framework.authtoken'
,
'rest_framework.authtoken'
,
'qr_code'
,
)
)
...
@@ -457,6 +447,9 @@ LOGGING = {
...
@@ -457,6 +447,9 @@ LOGGING = {
'level'
:
'INFO'
,
'level'
:
'INFO'
,
'propagate'
:
True
,
'propagate'
:
True
,
},
},
'django.template'
:
{
'level'
:
'WARNING'
,
},
}
}
}
}
########## END LOGGING CONFIGURATION
########## END LOGGING CONFIGURATION
...
@@ -513,6 +506,13 @@ if get_env_variable('DJANGO_SAML', 'FALSE') == 'TRUE':
...
@@ -513,6 +506,13 @@ if get_env_variable('DJANGO_SAML', 'FALSE') == 'TRUE':
'["uid"]'
))
'["uid"]'
))
optional_attrs
=
loads
(
get_env_variable
(
'DJANGO_SAML_OPTIONAL'
,
optional_attrs
=
loads
(
get_env_variable
(
'DJANGO_SAML_OPTIONAL'
,
'["mail", "cn", "sn"]'
))
'["mail", "cn", "sn"]'
))
SAML_KEY_FILE
=
get_env_variable
(
'DJANGO_SAML_KEY_FILE'
,
join
(
SITE_ROOT
,
'samlcert.key'
)
)
SAML_CERT_FILE
=
get_env_variable
(
'DJANGO_SAML_CERT_FILE'
,
join
(
SITE_ROOT
,
'samlcert.pem'
)
)
SAML_CONFIG
=
{
SAML_CONFIG
=
{
'xmlsec_binary'
:
which
(
'xmlsec1'
),
'xmlsec_binary'
:
which
(
'xmlsec1'
),
...
@@ -532,14 +532,16 @@ if get_env_variable('DJANGO_SAML', 'FALSE') == 'TRUE':
...
@@ -532,14 +532,16 @@ if get_env_variable('DJANGO_SAML', 'FALSE') == 'TRUE':
'required_attributes'
:
required_attrs
,
'required_attributes'
:
required_attrs
,
'optional_attributes'
:
optional_attrs
,
'optional_attributes'
:
optional_attrs
,
'want_response_signed'
:
False
,
'want_response_signed'
:
False
,
'logout_requests_signed'
:
True
,
'logout_responses_signed'
:
True
,
},
},
},
},
'metadata'
:
{
'local'
:
[
remote_metadata
],
},
'metadata'
:
{
'local'
:
[
remote_metadata
],
},
'key_file'
:
join
(
SITE_ROOT
,
'samlcert.key'
),
# private part
'key_file'
:
SAML_KEY_FILE
,
'cert_file'
:
join
(
SITE_ROOT
,
'samlcert.pem'
),
# public part
'cert_file'
:
SAML_CERT_FILE
,
'encryption_keypairs'
:
[{
'encryption_keypairs'
:
[{
'key_file'
:
join
(
SITE_ROOT
,
'samlcert.key'
),
# private part
'key_file'
:
SAML_KEY_FILE
,
'cert_file'
:
join
(
SITE_ROOT
,
'samlcert.pem'
),
# public part
'cert_file'
:
SAML_CERT_FILE
,
}]
}]
}
}
try
:
try
:
...
@@ -562,6 +564,9 @@ if get_env_variable('DJANGO_SAML', 'FALSE') == 'TRUE':
...
@@ -562,6 +564,9 @@ if get_env_variable('DJANGO_SAML', 'FALSE') == 'TRUE':
'DJANGO_SAML_ORG_ID_ATTRIBUTE'
)
'DJANGO_SAML_ORG_ID_ATTRIBUTE'
)
SAML_MAIN_ATTRIBUTE_MAX_LENGTH
=
int
(
get_env_variable
(
SAML_MAIN_ATTRIBUTE_MAX_LENGTH
=
int
(
get_env_variable
(
"DJANGO_SAML_MAIN_ATTRIBUTE_MAX_LENGTH"
,
0
))
"DJANGO_SAML_MAIN_ATTRIBUTE_MAX_LENGTH"
,
0
))
SAML_LOGOUT_REQUESTS_SIGNED
=
True
SAML_LOGOUT_RESPONSES_SIGNED
=
True
SESSION_EXPIRE_AT_BROWSER_CLOSE
=
True
LOGIN_REDIRECT_URL
=
"/"
LOGIN_REDIRECT_URL
=
"/"
...
...
circle/circle/settings/production.py
View file @
83246553
# Copyright 2014 Budapest University of Technology and Economics (BME IK)
#
# This file is part of CIRCLE Cloud.
#
# CIRCLE is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# CIRCLE is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
"""Production settings and globals."""
# flake8: noqa
"""Production settings for CIRCLE Cloud."""
from
os
import
environ
from
os
import
environ
from
sys
import
argv
from
sys
import
argv
from
urllib.parse
import
urlsplit
from
.base
import
*
# SAML
SESSION_COOKIE_SECURE
=
True
SAML_SESSION_COOKIE_SAMESITE
=
'None'
#SAML_SESSION_COOKIE_SECURE = True
from
.base
import
*
# noqa
# HTTP
ALLOWED_HOSTS
=
get_env_variable
(
'DJANGO_ALLOWED_HOSTS'
)
.
split
(
','
)
if
'runserver'
in
argv
:
if
'runserver'
in
argv
:
SECURE_PROXY_SSL_HEADER
=
(
'HTTP_X_FORWARDED_PROTOCOL'
,
'https'
)
SECURE_PROXY_SSL_HEADER
=
(
'HTTP_X_FORWARDED_PROTOCOL'
,
'https'
)
########## HOST CONFIGURATION
CSRF_TRUSTED_ORIGINS
=
[
# See: https://docs.djangoproject.com/en/1.5/releases/1.5/
"https://10.7.0.1"
,
# #allowed-hosts-required-in-production
"https://10.7.250.1"
,
ALLOWED_HOSTS
=
get_env_variable
(
'DJANGO_ALLOWED_HOSTS'
)
.
split
(
','
)
"https://smallville.cloud.bme.hu"
,
########## END HOST CONFIGURATION
"https://152.66.84.1"
,
]
########## EMAIL CONFIGURATION
# Email
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
EMAIL_BACKEND
=
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_BACKEND
=
'django.core.mail.backends.smtp.EmailBackend'
try
:
try
:
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host
EMAIL_HOST
=
get_env_variable
(
'EMAIL_HOST'
)
EMAIL_HOST
=
get_env_variable
(
'EMAIL_HOST'
)
except
ImproperlyConfigured
:
except
ImproperlyConfigured
:
EMAIL_HOST
=
'localhost'
EMAIL_HOST
=
'localhost'
else
:
else
:
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host-password
EMAIL_HOST_PASSWORD
=
get_env_variable
(
'EMAIL_HOST_PASSWORD'
,
''
)
EMAIL_HOST_PASSWORD
=
get_env_variable
(
'EMAIL_HOST_PASSWORD'
,
''
)
EMAIL_HOST_USER
=
get_env_variable
(
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-user
'EMAIL_HOST_USER'
,
'your_email@example.com'
EMAIL_HOST_USER
=
get_env_variable
(
'EMAIL_HOST_USER'
,
'your_email@example.com'
)
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-port
EMAIL_PORT
=
get_env_variable
(
'EMAIL_PORT'
,
587
)
EMAIL_PORT
=
get_env_variable
(
'EMAIL_PORT'
,
587
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-use-tls
EMAIL_USE_TLS
=
True
EMAIL_USE_TLS
=
True
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix
EMAIL_SUBJECT_PREFIX
=
'[
%
s] '
%
SITE_NAME
EMAIL_SUBJECT_PREFIX
=
'[
%
s] '
%
SITE_NAME
# See: https://docs.djangoproject.com/en/dev/ref/settings/#server-email
DEFAULT_FROM_EMAIL
=
get_env_variable
(
'DEFAULT_FROM_EMAIL'
)
DEFAULT_FROM_EMAIL
=
get_env_variable
(
'DEFAULT_FROM_EMAIL'
)
SERVER_EMAIL
=
get_env_variable
(
'SERVER_EMAIL'
,
DEFAULT_FROM_EMAIL
)
SERVER_EMAIL
=
get_env_variable
(
'SERVER_EMAIL'
,
DEFAULT_FROM_EMAIL
)
########## END EMAIL CONFIGURATION
########## CACHE CONFIGURATION
# Cache
# See: https://docs.djangoproject.com/en/dev/ref/settings/#caches
from
urllib.parse
import
urlsplit
CACHES
=
{
CACHES
=
{
'default'
:
{
'default'
:
{
'BACKEND'
:
'django.core.cache.backends.memcached.
Memcached
Cache'
,
'BACKEND'
:
'django.core.cache.backends.memcached.
PyLibMC
Cache'
,
'LOCATION'
:
urlsplit
(
get_env_variable
(
'CACHE_URI'
))
.
netloc
,
'LOCATION'
:
urlsplit
(
get_env_variable
(
'CACHE_URI'
))
.
netloc
,
}
}
}
}
########## END CACHE CONFIGURATION
########## SECRET CONFIGURATION
# Security
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY
=
get_env_variable
(
'SECRET_KEY'
)
SECRET_KEY
=
get_env_variable
(
'SECRET_KEY'
)
########## END SECRET CONFIGURATION
# Logging
level
=
environ
.
get
(
'LOGLEVEL'
,
'INFO'
)
level
=
environ
.
get
(
'LOGLEVEL'
,
'INFO'
)
LOGGING
[
'handlers'
][
'syslog'
][
'level'
]
=
level
LOGGING
[
'handlers'
][
'syslog'
][
'level'
]
=
level
for
i
in
LOCAL_APPS
:
LOGGING
[
'loggers'
][
i
]
=
{
'handlers'
:
[
'syslog'
],
'level'
:
level
}
for
app
in
LOCAL_APPS
:
LOGGING
[
'loggers'
][
'djangosaml2'
]
=
{
'handlers'
:
[
'syslog'
],
'level'
:
level
}
LOGGING
[
'loggers'
][
app
]
=
{
LOGGING
[
'loggers'
][
'django'
]
=
{
'handlers'
:
[
'syslog'
],
'level'
:
level
}
'handlers'
:
[
'syslog'
],
'level'
:
level
,
}
LOGGING
[
'loggers'
][
'djangosaml2'
]
=
{
'handlers'
:
[
'syslog'
],
'level'
:
level
,
}
LOGGING
[
'loggers'
][
'django'
]
=
{
'handlers'
:
[
'syslog'
],
'level'
:
level
,
}
# END
circle/dashboard/templates/dashboard/enable-two-factor.html
View file @
83246553
{% extends "dashboard/base.html" %}
{% extends "dashboard/base.html" %}
{% load i18n %}
{% load i18n %}
{% load qr_code %}
{% block content %}
{% block content %}
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -27,7 +28,7 @@
...
@@ -27,7 +28,7 @@
Your secret key is:
<strong>
{{ secret }}
</strong>
Your secret key is:
<strong>
{{ secret }}
</strong>
{% endblocktrans %}
{% endblocktrans %}
</span>
</span>
<img
src=
"
//chart.googleapis.com/chart?chs=255x255&chld=L|0&cht=qr&chl={{ uri }}"
/
>
<img
src=
"
{{ uri | qr_code }}"
with=
"300"
height=
300
alt=
"{{ uri }}"
>
<small><a
href=
"{{ uri }}"
>
{{ uri }}
</a></small>
<small><a
href=
"{{ uri }}"
>
{{ uri }}
</a></small>
</div>
</div>
<hr
/>
<hr
/>
...
...
circle/manager/mancelery.py
View file @
83246553
...
@@ -25,6 +25,7 @@ from datetime import timedelta
...
@@ -25,6 +25,7 @@ from datetime import timedelta
from
celery.schedules
import
crontab
from
celery.schedules
import
crontab
from
kombu
import
Queue
,
Exchange
from
kombu
import
Queue
,
Exchange
from
os
import
getenv
from
os
import
getenv
from
celeryconfig
import
maintenance_schedule
HOSTNAME
=
"localhost"
HOSTNAME
=
"localhost"
...
@@ -56,12 +57,11 @@ celery = Celery('manager',
...
@@ -56,12 +57,11 @@ celery = Celery('manager',
celery
.
config_from_object
(
'celeryconfig'
)
celery
.
config_from_object
(
'celeryconfig'
)
celery
.
conf
.
update
(
celery
.
conf
.
update
(
# CELERY_RESULT_BACKEND='amqp',
CELERY_QUEUES
=
(
CELERY_QUEUES
=
(
Queue
(
HOSTNAME
+
'.man'
,
Exchange
(
'manager'
,
type
=
'direct'
),
Queue
(
HOSTNAME
+
'.man'
,
Exchange
(
'manager'
,
type
=
'direct'
),
routing_key
=
"manager"
),
routing_key
=
"manager"
),
),
),
CELERYBEAT_SCHEDULE
=
{
CELERYBEAT_SCHEDULE
=
maintenance_schedule
(
{
'storage.periodic_tasks'
:
{
'storage.periodic_tasks'
:
{
'task'
:
'storage.tasks.periodic_tasks.garbage_collector'
,
'task'
:
'storage.tasks.periodic_tasks.garbage_collector'
,
'schedule'
:
timedelta
(
hours
=
1
),
'schedule'
:
timedelta
(
hours
=
1
),
...
@@ -78,7 +78,7 @@ celery.conf.update(
...
@@ -78,7 +78,7 @@ celery.conf.update(
# 'schedule': crontab(**crontab_parser(AUTO_MIGRATION_CRONTAB)),
# 'schedule': crontab(**crontab_parser(AUTO_MIGRATION_CRONTAB)),
# 'options': {'queue': 'localhost.man.slow'},
# 'options': {'queue': 'localhost.man.slow'},
# },
# },
}
}
)
)
)
...
...
circle/manager/moncelery.py
View file @
83246553
...
@@ -21,6 +21,7 @@ from celery.signals import worker_ready
...
@@ -21,6 +21,7 @@ from celery.signals import worker_ready
from
datetime
import
timedelta
from
datetime
import
timedelta
from
kombu
import
Queue
,
Exchange
from
kombu
import
Queue
,
Exchange
from
os
import
getenv
from
os
import
getenv
from
celeryconfig
import
maintenance_schedule
HOSTNAME
=
"localhost"
HOSTNAME
=
"localhost"
QUEUE_NAME
=
HOSTNAME
+
'.monitor'
QUEUE_NAME
=
HOSTNAME
+
'.monitor'
...
@@ -35,12 +36,11 @@ celery = Celery('monitor',
...
@@ -35,12 +36,11 @@ celery = Celery('monitor',
celery
.
config_from_object
(
'celeryconfig'
)
celery
.
config_from_object
(
'celeryconfig'
)
celery
.
conf
.
update
(
celery
.
conf
.
update
(
# CELERY_RESULT_BACKEND='amqp',
CELERY_QUEUES
=
(
CELERY_QUEUES
=
(
Queue
(
QUEUE_NAME
,
Exchange
(
'monitor'
,
type
=
'direct'
),
Queue
(
QUEUE_NAME
,
Exchange
(
'monitor'
,
type
=
'direct'
),
routing_key
=
"monitor"
),
routing_key
=
"monitor"
),
),
),
CELERYBEAT_SCHEDULE
=
{
CELERYBEAT_SCHEDULE
=
maintenance_schedule
(
{
'vm.update_domain_states'
:
{
'vm.update_domain_states'
:
{
'task'
:
'vm.tasks.local_periodic_tasks.update_domain_states'
,
'task'
:
'vm.tasks.local_periodic_tasks.update_domain_states'
,
'schedule'
:
timedelta
(
seconds
=
10
),
'schedule'
:
timedelta
(
seconds
=
10
),
...
@@ -70,7 +70,7 @@ celery.conf.update(
...
@@ -70,7 +70,7 @@ celery.conf.update(
'schedule'
:
timedelta
(
seconds
=
30
),
'schedule'
:
timedelta
(
seconds
=
30
),
'options'
:
{
'queue'
:
'localhost.monitor'
}
'options'
:
{
'queue'
:
'localhost.monitor'
}
},
},
}
}
)
)
)
...
...
circle/manager/slowcelery.py
View file @
83246553
...
@@ -21,6 +21,7 @@ from celery.signals import worker_ready
...
@@ -21,6 +21,7 @@ from celery.signals import worker_ready
from
datetime
import
timedelta
from
datetime
import
timedelta
from
kombu
import
Queue
,
Exchange
from
kombu
import
Queue
,
Exchange
from
os
import
getenv
from
os
import
getenv
from
celeryconfig
import
maintenance_schedule
HOSTNAME
=
"localhost"
HOSTNAME
=
"localhost"
QUEUE_NAME
=
HOSTNAME
+
'.man.slow'
QUEUE_NAME
=
HOSTNAME
+
'.man.slow'
...
@@ -36,18 +37,17 @@ celery = Celery('manager.slow',
...
@@ -36,18 +37,17 @@ celery = Celery('manager.slow',
celery
.
config_from_object
(
'celeryconfig'
)
celery
.
config_from_object
(
'celeryconfig'
)
celery
.
conf
.
update
(
celery
.
conf
.
update
(
# CELERY_RESULT_BACKEND='amqp',
CELERY_QUEUES
=
(
CELERY_QUEUES
=
(
Queue
(
QUEUE_NAME
,
Exchange
(
'manager.slow'
,
type
=
'direct'
),
Queue
(
QUEUE_NAME
,
Exchange
(
'manager.slow'
,
type
=
'direct'
),
routing_key
=
"manager.slow"
),
routing_key
=
"manager.slow"
),
),
),
CELERYBEAT_SCHEDULE
=
{
CELERYBEAT_SCHEDULE
=
maintenance_schedule
(
{
'vm.garbage_collector'
:
{
'vm.garbage_collector'
:
{
'task'
:
'vm.tasks.local_periodic_tasks.garbage_collector'
,
'task'
:
'vm.tasks.local_periodic_tasks.garbage_collector'
,
'schedule'
:
timedelta
(
minutes
=
10
),
'schedule'
:
timedelta
(
minutes
=
10
),
'options'
:
{
'queue'
:
'localhost.man.slow'
}
'options'
:
{
'queue'
:
'localhost.man.slow'
}
},
},
}
}
)
)
)
...
...
requirements/base.txt
View file @
83246553
...
@@ -23,8 +23,9 @@ django-statici18n==2.2.0
...
@@ -23,8 +23,9 @@ django-statici18n==2.2.0
django-tables2==2.4.1
django-tables2==2.4.1
django-taggit==4.0.0
django-taggit==4.0.0
django-utils-six==2.0
django-utils-six==2.0
djangosaml2==1.
3.5
djangosaml2==1.
11.1
djangorestframework==3.15.2
djangorestframework==3.15.2
django-qr-code==4.2.0
# A régi, működő környezetből ismert commitra rögzítve.
# A régi, működő környezetből ismert commitra rögzítve.
#django-sshkey @ git+https://git.ik.bme.hu/circle/django-sshkey.git@c03c40304dafff9e25342bc6988d453810d5b7ad
#django-sshkey @ git+https://git.ik.bme.hu/circle/django-sshkey.git@c03c40304dafff9e25342bc6988d453810d5b7ad
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment