~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/archivepublisher/scripts/publish_ftpmaster.py

  • Committer: Jeroen Vermeulen
  • Date: 2011-08-08 07:31:08 UTC
  • mto: This revision was merged to the branch mainline in revision 13637.
  • Revision ID: jeroen.vermeulen@canonical.com-20110808073108-36jfyvegwaq3sx71
Make publishing scripts share a single lock file for a system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
from datetime import datetime
12
12
import os
 
13
 
13
14
from pytz import utc
14
15
from zope.component import getUtility
15
16
 
16
17
from canonical.config import config
17
18
from lp.archivepublisher.config import getPubConfig
18
19
from lp.archivepublisher.interfaces.publisherconfig import IPublisherConfigSet
 
20
from lp.archivepublisher.publishing import GLOBAL_PUBLISHER_LOCK
19
21
from lp.registry.interfaces.distribution import IDistributionSet
20
22
from lp.registry.interfaces.pocket import pocketsuffix
 
23
from lp.registry.interfaces.series import SeriesStatus
21
24
from lp.services.scripts.base import (
22
25
    LaunchpadCronScript,
23
26
    LaunchpadScriptFailure,
24
27
    )
25
 
from lp.registry.interfaces.series import SeriesStatus
26
28
from lp.services.utils import file_exists
27
29
from lp.soyuz.enums import ArchivePurpose
28
 
from lp.soyuz.scripts.publishdistro import PublishDistro
29
30
from lp.soyuz.scripts.ftpmaster import LpQueryDistro
30
31
from lp.soyuz.scripts.processaccepted import ProcessAccepted
31
 
 
 
32
from lp.soyuz.scripts.publishdistro import PublishDistro
32
33
 
33
34
# XXX JeroenVermeulen 2011-03-31 bug=746229: to start publishing debug
34
35
# archives, get rid of this list.
160
161
    back in their original places (though with updated contents).
161
162
    """
162
163
 
 
164
    lockfilename = GLOBAL_PUBLISHER_LOCK
 
165
 
163
166
    def add_my_options(self):
164
167
        """See `LaunchpadScript`."""
165
168
        self.parser.add_option(