Skip to content

prevent race conditions from multiple deployments #19

@evanugarte

Description

@evanugarte

right now we create a thread no matter what, how can we prevent multiple threads running at once, if we feel like merging a bunch of prs all at once?

thread = threading.Thread(target=update_repo, args=(config[key],))

what if we merge 3 prs 3 seconds apart, the first pr will trigger a deploy, what should we do with the other two prs? we should deploy the 3rd for sure.

how can we have calls to /webhook

  • run if nobodys waiting, run like normal
  • if theres an ongoing thread, wait
  • if theres an ongoing thread and something else was waiting for that thread, "disqualify" the person waiting and take their place
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions