<s> import logging <EOL> from fabric . api import env , task , require <EOL> from neckbeard . actions . contrib_hooks import ( <EOL> notifies_hipchat , <EOL> _take_temporary_pagerduty , <EOL> ) <EOL> from neckbeard . environment_manager import Deployment <EOL> INCREMENT_START_MSG = ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) <EOL> INCREMENT_END_MSG = ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> "<STR_LIT>" <EOL> ) <EOL> logger = logging . getLogger ( '<STR_LIT>' ) <EOL> @ task <EOL> @ notifies_hipchat ( start_msg = INCREMENT_START_MSG , end_msg = INCREMENT_END_MSG ) <EOL> def increment ( ) : <EOL> """<STR_LIT>""" <EOL> require ( '<STR_LIT>' ) <EOL> require ( '<STR_LIT>' ) <EOL> deployment = Deployment ( <EOL> env . _deployment_name , <EOL> env . _deployment_confs [ '<STR_LIT>' ] , <EOL> env . _deployment_confs [ '<STR_LIT>' ] , <EOL> env . _deployment_confs [ '<STR_LIT>' ] , <EOL> ) <EOL> deployment . verify_deployment_state ( ) <EOL> try : <EOL> deployment . increment_generation ( ) <EOL> except : <EOL> logger . critical ( "<STR_LIT>" ) <EOL> raise <EOL> pagerduty_conf = env . _deployment_confs [ '<STR_LIT>' ] . get ( '<STR_LIT>' , { } ) <EOL> if pagerduty_conf . get ( '<STR_LIT>' , False ) : <EOL> _take_temporary_pagerduty ( <EOL> duration = pagerduty_conf . get ( '<STR_LIT>' ) , <EOL> api_key = pagerduty_conf . get ( '<STR_LIT>' ) , <EOL> user_id = pagerduty_conf . get ( '<STR_LIT>' ) , <EOL> project_subdomain = pagerduty_conf . get ( '<STR_LIT>' ) , <EOL> schedule_key = pagerduty_conf . get ( '<STR_LIT>' ) , <EOL> ) <EOL> logger . warning ( "<STR_LIT>" <EOL> "<STR_LIT>" ) </s>
