EvernodeXRPL / evernode-sdk

Evernode SDK
Other
43 stars 7 forks source link

Long running process? #62

Closed shortthefomo closed 1 year ago

shortthefomo commented 1 year ago

Is there a way to run a process for a long time?

app.isLoaded() in my example is always FALSE every time a new consens round comes.. how to do this?

Screen Shot 2023-04-26 at 21 12 56
shortthefomo commented 1 year ago

Basically in my app here i load a Graphing tool eg. https://twitter.com/ShortTheFOMO/status/1649583563770064897?s=20 that process needs to stay open and run. It then will spit out when a tx needs to get signed at which I was then hoping to use evernode to do a multisig tx submission, back to the XRPL. Evernodes job here basically is just to get consensy to sign in my example.

But having app reinitialize every time consensys comes around is a bit of an issue here for me.

(that graph can run with out the UI so basically is just a long running process)

ravinsp commented 1 year ago

@lathanbritz This is not something HotPocket can do (at least currently). You need to reinitialize everything into memory since every contract execution is a fresh run. What you can do to help the situation is cache the last loaded graph data onto disk before the contract exits, and then populate your in-memory Graph data structures from the cache next time your contract executes.

shortthefomo commented 1 year ago

Thanks @ravinsp def a +1 for the future, closing this as this is by design.