Remote Queue - check_if_add_items_to_queue

Info

  • Not getting archived ones. We were already checking the "retry" one that we ignore archived ones we need to also check here (in case it hasn't tried once yet!)
  • Expecting this to operate in a thread
  • Exclude success status, because if by some strange thing it
    tries to retry a successful one we don't really want to do that
    not sure if this is a great pattern long term
    but while we are still working kinks out of
    the retry thing it may avoid issues.
  • .first() will always return same element if nothing else changes in DB but generally this isn't relevant

🚧

Use with_for_update / skip lock

Important: Why with_update https://stackoverflow.com/questions/40700309/flask-sqlalchemy-with-for-update-row-lock

Directional Goals

  1. Seperate automatic retry from main check
  2. Smarter routing (for newly collected inputs) based on type, eg video etc

Did this page help you?