~ubuntu-branches/ubuntu/trusty/maas/trusty-security

« back to all changes in this revision

Viewing changes to src/maasserver/start_up.py

  • Committer: Package Import Robot
  • Author(s): Greg Lutostanski
  • Date: 2014-08-29 13:27:34 UTC
  • mto: (61.1.4 trusty-proposed)
  • mto: This revision was merged to the branch mainline in revision 62.
  • Revision ID: package-import@ubuntu.com-20140829132734-d47evihju2etdwcy
Tags: upstream-1.5.4+bzr2294
ImportĀ upstreamĀ versionĀ 1.5.4+bzr2294

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from textwrap import dedent
20
20
 
21
 
from django.db import connection
 
21
from django.db import (
 
22
    connection,
 
23
    transaction,
 
24
    )
22
25
from maasserver import (
23
26
    eventloop,
24
27
    locks,
51
54
    but this method uses file-based locking to ensure that the methods it calls
52
55
    internally are not ran concurrently.
53
56
    """
54
 
    with locks.startup:
55
 
        inner_start_up()
 
57
    with transaction.atomic():
 
58
        with locks.startup:
 
59
            inner_start_up()
56
60
 
57
61
    eventloop.start().wait(10)
58
62