|
|
|
|
@ -27,13 +27,21 @@ tickets = {} |
|
|
|
|
commands = {} |
|
|
|
|
|
|
|
|
|
def stage(stage_num): |
|
|
|
|
def ticket(func): |
|
|
|
|
def add_func(func): |
|
|
|
|
if not callable(func): |
|
|
|
|
raise NotImplementedError('func must be a callable') |
|
|
|
|
func = ticket(func) |
|
|
|
|
stages.setdefault(stage_num, OrderedDict()).update({func.__name__: func}) |
|
|
|
|
tickets.update({func.__name__: func}) |
|
|
|
|
return func |
|
|
|
|
return ticket |
|
|
|
|
return add_func |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def ticket(func): |
|
|
|
|
if not callable(func): |
|
|
|
|
raise NotImplementedError('func must be a callable') |
|
|
|
|
# stages.setdefault(stage_num, OrderedDict()).update({func.__name__: func}) |
|
|
|
|
tickets.update({func.__name__: func}) |
|
|
|
|
return func |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# command_pattern |
|
|
|
|
@ -159,6 +167,11 @@ def t1460(): |
|
|
|
|
run('python manage.py migrate newsletter') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ticket |
|
|
|
|
def update_crontab(): |
|
|
|
|
with cd(REMOTE_HOME_DIR): |
|
|
|
|
run('python manage.py crontab remove') |
|
|
|
|
run('python manage.py crontab add') |
|
|
|
|
|
|
|
|
|
# def stage3_pre_final(): |
|
|
|
|
# with cd(REMOTE_HOME_DIR): |
|
|
|
|
|