~ursinha/ubuntu-ci-services-itself/401-copying-di-check

« back to all changes in this revision

Viewing changes to lander/lander/run_worker.py

  • Committer: Evan Dandrea
  • Date: 2014-03-10 22:25:00 UTC
  • mfrom: (352 ubuntu-ci-services-itself)
  • mto: This revision was merged to the branch mainline in revision 353.
  • Revision ID: evan.dandrea@canonical.com-20140310222500-vu87pulv0k74b8sh
Merge with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import time
24
24
import urllib2
25
25
 
26
 
# the worker might not have installed this module, so determine the path
27
 
# and add it, so we can always safely import stuff
28
 
sys.path.append(os.path.join(os.path.dirname(__file__), '../ci-utils'))
29
26
from ci_utils import jenkins_utils
30
27
from ci_utils import dump_stack
31
28
 
32
29
MAX_RETRIES = 15
33
 
SERVICE_PATH = os.path.join(os.path.dirname(__file__), '../juju-relations')
 
30
SERVICE_PATH = os.path.join(os.path.dirname(__file__), '../../juju-relations')
34
31
 
35
32
# set up a root logger for everything
36
33
stdout_handler = logging.StreamHandler(stream=sys.stdout)
88
85
                request_id = out_data['id']
89
86
                logging.info('request_id: {}'.format(request_id))
90
87
                logging.info('request_parameters: {}'.format(out_data))
91
 
                job_parameters = {'request_id': request_id,
92
 
                                  'request_parameters': json.dumps(out_data)}
 
88
                job_parameters = {
 
89
                    'request_id': request_id,
 
90
                }
93
91
                jenkins_utils.trigger_build(jenkins_config, job_parameters)
94
92
        rc = 0
95
93
    except urllib2.HTTPError as e: