democrasite.webiscite.tasks module

All celery tasks should be defined in this module

This module contains all of the celery tasks used by the webiscite app. Currently, the defined tasks are all related to processing pull requests from democrasite.webiscite.webhooks().

(task)democrasite.webiscite.tasks.submit_bill(bill_id: int) None

Handles the final processing and closing of a bill

When the voting period of a bill ends, this method is called with the id of that bill. It verifies that the bill is still active and counts the votes. If the bill has enough votes to pass (which varies depending on whether or not it’s constitutional), it is merged into the master branch of the repository. Finally, no regardless of the status of the bill, the pull request is closed.

Parameters:

bill_id – The id of the bill to submit