sequentech / deployment-tool

Sequent deployment ansible scripts
GNU Affero General Public License v3.0
14 stars 21 forks source link

infinite loop when creating election #216

Open jsperezg opened 6 years ago

jsperezg commented 6 years ago

Good morning. I've been trying to install agora following the instructions. At this moment I'm stuck with election creation. The election itself is written into the database however I can't start the it. The browser log shows that when I press the 'Create election' the api call create is invoked and it returs the following json:

{"date":"2018-05-04 10:26:56.791","payload":"ok"}

After this call it seems to enter into an infinite loop asking for election data and election stats. Seems that it's waiting for something to happen.

/elections/api/election/41

{"date":"2018-05-04 10:26:57.816","payload":{"id":41,"configuration":{"id":41,"layout":"simple","director":"aut1.aspgems.com","authorities":["aut2.aspgems.com"],"title":"New election","description":"","questions":[{"description":"","layout":"accordion","max":1,"min":1,"num_winners":1,"title":"New question 0","tally_type":"plurality-at-large","answer_total_votes_percentage":"over-total-valid-votes","answers":[{"id":0,"category":"","details":"","sort_order":0,"urls":[],"text":"Yes"}],"extra_options":{"shuffle_categories":true,"shuffle_all_options":true,"shuffle_category_list":[],"show_points":false}}],"start_date":"2015-01-27T16:00:00.001","end_date":"2015-01-27T16:00:00.001","presentation":{"share_text":[{"network":"Twitter","button_text":"","social_message":"I have just voted in election __URL__, you can too! #nvotes"},{"network":"Facebook","button_text":"","social_message":"__URL__"}],"theme":"default","urls":[],"theme_css":""},"real":false,"extra_data":"{}","virtual":false,"virtualSubelections":[],"logo_url":""},"state":"registered","startDate":"2015-01-27T16:00:00.001","endDate":"2015-01-27T16:00:00.001","real":false,"virtual":false,"logo_url":""}}

and /elections/api/election/41/stats

{"date":"2018-05-04 10:26:57.899","payload":{"totalVotes":0,"votes":0,"days":[]}}
jsperezg commented 6 years ago

I don't know if it's related or not but dump_pks from command line finishes with the following error:

$ ./admin.py dump_pks 43 400 {"date":"2018-05-04 11:05:34.021","payload":{"error":"No PKS for election 43","code":7}} (env)agoraelec