- 
                Notifications
    
You must be signed in to change notification settings  - Fork 11
 
Open
Description
logging.info("pulling submissions for current commitfest")
cfbot_commitfest.pull_submissions(conn, commitfest_id)
logging.info("pulling submissions for next commitfest")
cfbot_commitfest.pull_submissions(conn, commitfest_id + 1)
The above seems quite fragile. The CF only will ever have a single Open CF and optionally a single In Progress CF. It is also going to have a single Parked/Draft CF soon. When we add that CF we should do so enforcing these single-instances of each and add an API endpoint that converts the named CFs into their actual numbers. This can then query that API and execute pull_submissions conditionally for each of the CF types.
Adding the API endpoint to pgcommitfest PR 62 seems trivial as would using it here to get rid of the “+1” code. pseudo-code:
open_cf, inprogress_cf, parked_cf = rpc.get_non_closed_cfs(conn)
if open_cf: pull_submission(conn, open_cf)
If inprogress_cf: pull_submission_conn, inprogress_cf)
If parked_cf: pull_submission(conn, parked_cf)
Metadata
Metadata
Assignees
Labels
No labels