> 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/1.3/g2p-bridge/development/design-specifications/example-bank/openg2p-g2p-bridge-example-bank-celery.md).

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
