Update FMN roles for 2.0.0

This commit is contained in:
Jeremy Cline 2017-11-15 18:12:11 +00:00
parent f939d582dd
commit f56b1ecd83
3 changed files with 4 additions and 66 deletions

View file

@ -12,15 +12,10 @@
tasks:
- name: clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
command: dnf clean all
check_mode: no
when: env != "staging"
- name: yum update FMN packages from main repo
yum: name="python-fmn" state=latest
when: env != "staging"
- name: Update FMN packages
package: name=python-fmn state=latest
when: env == "staging"
package: name="python-fmn" state=latest
- name: verify the frontend and stop it
hosts: notifs-web:notifs-web-stg
@ -75,10 +70,7 @@
- fmn-worker@2
- fmn-worker@3
- fmn-worker@4
- name: Stop the celerybeat service
service: name=fmn-celerybeat state=stopped
when: env == "staging"
- fmn-celerybeat
- name: Upgrade the database
command: /usr/bin/alembic -c /usr/share/fmn/alembic.ini upgrade head
@ -93,10 +85,7 @@
- fmn-worker@2
- fmn-worker@3
- fmn-worker@4
- name: Re-start the celerybeat service
service: name=fmn-celerybeat state=started
when: env == "staging"
- fmn-celerybeat
- name: And... start the backend again
service: name="fedmsg-hub" state=started

View file

@ -68,15 +68,7 @@
- fmn-worker@2
- fmn-worker@3
- fmn-worker@4
tags:
- notifs
- notifs/backend
- name: start the FMN celerybeat service
service: name={{item}} enabled=yes state=started
with_items:
- fmn-celerybeat
tags:
- notifs
- notifs/backend
when: env == "staging"

View file

@ -8,37 +8,6 @@ ircnick = "fedora-notif"
base = "https://apps.%s/notifications/" % domain
{% if env != 'staging' %}
from dogpile.core.readwrite_lock import ReadWriteMutex
from dogpile.cache.backends.file import AbstractFileLock
class MutexLock(AbstractFileLock):
""" Use an in-memory lock for our dogpile cache
in an attempt to reduce thread competition.
"""
def __init__(self, filename):
self.mutex = ReadWriteMutex()
def acquire_read_lock(self, wait):
ret = self.mutex.acquire_read_lock(wait)
return wait or ret
def acquire_write_lock(self, wait):
ret = self.mutex.acquire_write_lock(wait)
return wait or ret
def release_read_lock(self):
return self.mutex.release_read_lock()
def release_write_lock(self):
return self.mutex.release_write_lock()
@classmethod
def __json__(cls):
return repr(cls)
{% endif %}
config = {
{% if env == 'staging' %}
@ -181,7 +150,6 @@ config = {
"fmn.support_email": "notifications@" + domain,
# Generic stuff
{% if env == 'staging' %}
"logging": dict(
loggers=dict(
fmn={
@ -195,15 +163,4 @@ config = {
'handlers': ['console', 'mailer'],
},
),
{% else %}
"logging": dict(
loggers=dict(
fmn={
"level": "DEBUG",
"propagate": False,
"handlers": ["console", "mailer"],
},
),
),
{% endif %}
}