PeerAssets / papi

[DEPRECATED] Dockerized PeerAssets API service.
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Required for jobs.py #31

Closed saeveritt closed 6 years ago

saeveritt commented 6 years ago

jobs.py needs the following.

@rq.job recurring 5 minute crontask that checks the Queue class found in sync.py ( redis connection ) for transactions that need to be processed. These transactions come from walletnotify. The transactions need to be put together in a batch gettransaction rpc call and parsed to determine if they're valid PeerAssets transactions. If so, determine which deck they belong to and add them to the papi database then update their respective deckstates.

@rq.job recurring 5 minute crontask that grabs the most recent card recorded into papi.db, grabs the checkpoint (blockhash) of that card, and then validates that the blockhash is still valid on the chain with a getblock <blockhash> rpc call. If not, grab the next card until a valid blockhash appears. From that point remove all cards/decks that come after that checkpoint chronologically and rescan/recalculate deckstates.

Docker settings for rq worker. May need to define the FLASK_APP environment variable so the flask rq scheduler or flask rq worker points to the correct directory.

saeveritt commented 6 years ago

Looking for other solutions rather than using rq.