From our previous discussions, I understand that you have provided a light weight function that may be called when user disconnects, which may be registered with RegisterEventSessionEnd. We also discussed that the function is on purpose kept ‘light’ since the function may need to be called for a graceful shutdown and thus it should not include any heavy db queries that may interrupt with shutdown.
Is it possible to have a full functionality version (i.e. which has access to db and NakamaModule) and a light version (like the one that we have) to coexist? Only the light version may be called in case of emergency / distress, while the full functionality version may be used for general purposes.
My use case is this: I would like to reward the user based on the length of the session in the game. The easiest way that I could think of, is to record the times at connect and disconnect. But since I don’t have db / nk in RegisterEventSessionEnd, I am not able to record the session disconnect time.
Is there a better way to achieve this?