Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.

9 downloads

Install on DigitalOcean Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-server.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-server.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-server.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Daniel Quellhorst Changelog for this batch. 65ef78d 3 hours, 49 minutes ago History
exchange_deliver.py · 1.1 KB · 28 lines
1"""system_exchange_deliver -- the daemon's delivery pass over exchange_outbox.
2
3Declared as a schedule in app-exchange's manifest (every three minutes): every
4queued document whose next attempt has come is posted to its partner with a
5freshly signed delivery stamp; a verified receipt marks it delivered, a
6refusal stops it (`dead`, the attention queue exchange_undelivered), and no
7answer schedules the next attempt with exponential backoff
8(object_exchange_box.deliver_due). Time-driven, so it belongs to the daemon
9(docs/logic-decisions.md #2). Retrying is safe: the receiver stores a
10document once by its id, and the call is not paid.
11
12POST = EVENT: the scheduler calls POST and the dispatcher EVENT (AGENTS.md).
13"""
14
15import object_exchange
16import object_exchange_box as box
17
18
19def EVENT(request):
20 try:
21 return box.deliver_due(box.base_dir())
22 except object_exchange.ExchangeUnavailable as exc:
23 return {"status": 409, "code": "exchange_unavailable", "error": str(exc)}
24 except box.Refusal as refusal:
25 return refusal.answer()
26
27
28POST = EVENT