@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.
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
orflask rq worker
points to the correct directory.