def copy_key(name, push_id=None): project = Project.get(name=name) project.ssh_key = ops.fetch_key(name) project.save() if not push_id: return push(push_id, { "typ": "project.key", "key": project.ssh_key, "project": project.name, })
def task_clean(project, s): s('cleaning') ops.do_clean(project.name) project.ssh_key = None s('inactive') push(s._id, { "typ": "project.key", "key": "", "project": project.name, })
def push_status(push_id, project, _status, **kw): status(project, _status) if not push_id: return data = { "typ": "project.status", "status": _status, "project": project.name, } data.update(kw) push(push_id, data) push(push_id, { "typ": "flash", "project": project.name, "op": _status, })