vipyrsec / dragonfly-mainframe

The mainframe for Dragonfly
https://docs.vipyrsec.com/dragonfly-mainframe/
MIT License
4 stars 2 forks source link

Atomize `POST /jobs` #236

Closed jonathan-d-zhang closed 3 months ago

jonathan-d-zhang commented 3 months ago

We need to lock during the select in order to make sure only one thread is returning a specific package. To avoid race conditions where two threads write twice to the same row, we use SKIP LOCKED.

Closes #234