def post(self): program = web.form("program").program machine = tx.db.select("machines", where="name = ?", vals=[self.machine])[0] web.enqueue(build, machine["ip_address"], program) raise web.Accepted(f"{program} is building on the machine..")
def post(self): name = web.form("name").name token = tx.db.select("providers", where="service = ?", vals=["digitalocean.com"])[0]["token"] web.enqueue(spawn_machine, name, token) raise web.Accepted("machine is being created..")
def post(self): try: topic_url = web.form("topic_url").topic_url except web.BadRequest: pass else: web.enqueue(websub.subscribe, f"{web.tx.origin}/subscriptions/sent", topic_url) return app.view.sent.subscription_requested() mode = web.form("hub.mode")["hub.mode"] if mode != "subscribe": raise web.BadRequest( 'hub only supports subscription; `hub.mode` must be "subscribe"' ) form = web.form("hub.topic", "hub.callback") # TODO raise web.BadRequest("topic not found") web.enqueue(websub.verify_received_subscription, form["hub.topic"], form["hub.callback"]) raise web.Accepted("subscription request accepted")
def post(self): web.enqueue(update_system) raise web.Accepted(app.view.update())
def post(self): """Details of the webmention.""" raise web.Accepted("webmention received")
def post(self): """""" form = web.form("source", "target") web.enqueue(receive, form.source, form.target) raise web.Accepted("webmention received")
def post(self): web.enqueue(spawn_canopy, web.tx.providers.get_digitalocean_token()) raise web.Accepted("canopy tree is being spawned in the cloud..")
def post(self): machine = tx.db.select("machines", where="name = ?", vals=[self.machine])[0] web.enqueue(host.upgrade_system, machine["ip_address"]) raise web.Accepted("system is updating on the machine..")