Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Gracefully handle users being offline #62

Closed
Makeshift opened this issue Feb 24, 2018 · 7 comments
Closed

Gracefully handle users being offline #62

Makeshift opened this issue Feb 24, 2018 · 7 comments

Comments

@Makeshift
Copy link
Owner

Stuff won't load properly if they're offline.

Unhandled rejection esi:Error: Error from ESI service for https://esi.tech.ccp.is/v1/fleets/1025011408543/members/: {"error":"{'error_label': 'FleetCandidateOffline', 'error_dict': {'invitee': (2, 95334207)}}"}: cannot POST /v1/fleets/1025011408543/members/?datasource=tranquility&language=en-us (420)
    at getExceptionFromAgentError (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/eve-swagger/lib/internal/esi-agent.js:82:17)
    at /home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/eve-swagger/lib/internal/esi-agent.js:243:22
    at Request.callback (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/superagent/lib/node/index.js:703:3)
    at IncomingMessage.<anonymous> (/home/user/eve-goons-newwaitlist/eve-goons-waitlist/node_modules/superagent/lib/node/index.js:922:12)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

@samuelgrant
Copy link
Collaborator

We should check to see if users are online before we let them join the waitlist. Furthermore, let's remove people (or at least hide them using a bool) if ESI has reported they are offline for more than two minutes.

@Makeshift
Copy link
Owner Author

They can go offline while waiting though, we should still check either prior to invite or we should just stop it from being spammed if they're offline

@samuelgrant
Copy link
Collaborator

I would still check /location/online once a minute or so, even if you don't hide them displaying an indicator to the FC may be useful. With the removal of the communication fields (#58) we now have room for status indicators.

@samuelgrant
Copy link
Collaborator

Current plan:

  • Users cannot join the waitlist while they are offline. If they try to join while they are offline they will be rejected and get a notification prompting them to login first.
  • Add a check to see if the user is online in the globalWaitlist.js file.
    • If the user is online then do the other checks.
    • If the user is offline set an offline error or increase by one. If they reach a value that indicates they have been offline for five minutes remove them from the waitlist. - Perhaps flag them on the FC page after two minutes.
    • If the user is flagged offline for some reason don't check their location or any other functions that might be put in this timer function.
    • I don't plan on blocking invites for offline users. The FCs get feedback now to say they were rejected for being offline. Adding a function to block that seems pointless, it adds to code complexity and it would be delayed.

I want to update the polling timer so it is once every 30 seconds.

@Makeshift what do you think?

@Makeshift
Copy link
Owner Author

Eh I'd rather not straight up remove people for being offline, they might have swapped characters for a minute and the FC can shout out on comms to tell them to get their asses online. The rest sounds fine though.

@samuelgrant
Copy link
Collaborator

the idea was that they would be removed after being offline but I will set a flag instead

@samuelgrant
Copy link
Collaborator

Now that the FCs get feedback for failed invites I am going to close this issue. Once #47 has been implemented I will add an online check before letting people join the waitlist and I may still remove someone who has been offline for a while (~15 minutes), either way they will be flagged for the FCs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants