Re: Freeze break request: make only fas01 clear sessions, resolving a deadlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 10, 2015 at 06:38:32PM -0400, Patrick Uiterwijk wrote:
> Change in controllers.py is at line 101: "if socket.gethostname()...."
> +
> +    def clean_up(self, sess):
> +        # This is to make sure that only one server cleans up sessions
> +        if socket.gethostname() != 'fas01.phx2.fedoraproject.org':
> +            return
> +        result = SessionTable.delete(
> +            SessionTable.c.expiration_time.__lt__(datetime.datetime.now())
> +            ).execute()

This is indeed terribly hacky but if it works, +1 for now.

Pierre



[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux