hacknight
hacknight copied to clipboard
Sync DoAttend and Hacknight registration.
There might be multiple ways of doing it.
My thought: when a person registers, check the doattend registration list and see if he has registered there. If yes, approve the hacknight participation, else send a notification saying he has to register on doattend. This can be improved if the status can be polled every two hours or so for approval and every 1-2 days for sending a reminder.
If a person registers on doattend, automatically sign him on the hacknight page and get him approved.
If an event has doattend registration url, then push event name, participant name, email, doattend url
to queue. Then fetch the details from doattend and update the status of the participant. If the participant is updated by the worker then set a flag, else notify admin the participant hasn't bought ticket.
We will be using rq
and for monitoring use rqinfo
or rqdashboard
. https://github.com/nvie/rq-dashboard.
DoAttend registration URLs aren't useful. You need DoAttend event id and API key. Copy this code from Eventframe's Participant List node.
@kracekumar You don't need RQ or RQDashboard for this feature. There are exactly two users for this feature: @harisibrahimkv and you. Regular hacknight users will not have a DoAttend API key since DoAttend does not hand that out publicly. You cannot ask users for a DoAttend login and password to scrape data with mechanise.
Don't overengineer this feature. Get it done as quickly as possible since it is your own time that will be wasted if you get into a pull request review battle.
@jace I never mentioned to get doattend username and password from user. If an event has doattend registration url
what I meant by this is if event creator has provided doattend registration url or event admin url(http://doattend.com/events/https://github.com/hasgeek/peopleflow/blob/master/peopleflow/views/event.py#L48
and this will only work for hasgeek events.
Krace, even if the event has a DoAttend URL, what will you do with it? You will not have access to the registration database without either a username/password or API key. You have to collect that somewhere.
My idea was to add Username/Password to production.py
since storing it in db will have null values and this feature may not be needed after sometime. Reason for adding rq
was nginx may time out before verifying and syncing participant status. This assumption will hold true for HasGeek events.
Krace, that's still the wrong approach. DoAttend has an API. Use it. We should be encouraging DoAttend to make their API public, and thereby also putting the pressure on Explara to come up with an API.
Step 1: Limited UI edition for our use case. Step 2: Tell DoAttend/Explara to get their act together.
You also don't need to worry about nginx timeouts and background processes in v1. Use Flask's streaming support like Eventframe does. http://flask.pocoo.org/docs/patterns/streaming/