> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/products/g2p-bridge/design-specifications/example-bank/openg2p-g2p-bridge-example-bank-celery.md).

# example-bank-celery

openg2p-g2p-bridge-example-bank-celery

This is a celery based microservice. This microservice has the following

1. A celery beat producer - process\_payments\_beat\_producer - that picks up all "PENDING" <mark style="color:blue;">**initiate\_payment\_batch\_requests**</mark> and delegates the batch\_id to a celery worker
2. A celery worker - <mark style="color:blue;">**process\_payments\_worker**</mark> - that receives the batch\_id from the beat producer.
   1. It then picks up all the individual payments for that batch\_id and creates book keeping entries for the remitter side (debit leg) for every payment
   2. <mark style="color:red;">Since this is only a simulator, it only generates the Debit leg of the book keeping (for the remitter account) and does not bother about the Credit leg (the beneficiary part) of the book keeping</mark>
   3. It updates the <mark style="color:blue;">**account.book\_balance**</mark> and <mark style="color:blue;">**account.available\_balance**</mark> accordingly for each payment
   4. It also randomly produces some reversal entries for every payment transaction
3. A celery worker - <mark style="color:blue;">**account\_statement\_generator**</mark> - that receives <mark style="color:blue;">**account\_statement.id**</mark> from the generate\_statement controller API
   1. It generates an MT940 account statement for that account and persists that statement (as a TEXT) in <mark style="color:blue;">**account\_statement.lob**</mark>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openg2p.org/products/g2p-bridge/design-specifications/example-bank/openg2p-g2p-bridge-example-bank-celery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
