1. 17 Aug, 2021 1 commit
  2. 13 Aug, 2021 1 commit
  3. 20 Jul, 2021 2 commits
  4. 20 May, 2021 4 commits
  5. 15 May, 2021 3 commits
  6. 14 May, 2021 2 commits
  7. 12 May, 2021 4 commits
  8. 09 Mar, 2021 1 commit
  9. 25 Jan, 2021 1 commit
  10. 06 Jan, 2021 1 commit
  11. 19 Dec, 2020 1 commit
  12. 20 Nov, 2020 4 commits
  13. 06 Oct, 2020 1 commit
  14. 08 Jun, 2020 1 commit
    • jkhsjdhjs's avatar
      db dump timer: change service type to simple · b4f0d564
      jkhsjdhjs authored
      oneshot considers the service to be active after the main process exits.
      This is not wanted here, removing the declaration makes the type default
      to simple, which considers units to be active when the main process is
      running.
      b4f0d564
  15. 18 May, 2020 1 commit
  16. 01 May, 2020 2 commits
  17. 16 Mar, 2020 2 commits
    • jkhsjdhjs's avatar
      useless: fix syntax warning · 80cfa2f8
      jkhsjdhjs authored
      storage: shorten code
      80cfa2f8
    • jkhsjdhjs's avatar
      add auto reconnect for postgres · e03f5d0a
      jkhsjdhjs authored
      This only works on the second database interaction, since psycopg2 only notices that
      the connection is gone, when a query is executed.
      
      So in the common case reconnect works as follows:
      - some bot method calls a cursor function like .execute(), .fetchone(), etc.
        - this raises an error if the connection is broken
        - if following code then requests a new cursor, this will also fail since psycopg2
          now knows that the connection is gone
        - the error is caught in storage.DBConn.cursor(), a new connection will be set up
          of which a new cursor is yielded
      If the error happens in connection.commit() or .rollback() instead we can instantly
      reconnect since these methods are wrapped.
      
      So why not wrap the cursor methods as well?
      Consider the following example:
      A query is the last thing that was executed on a cursor.
      The database connection is lost.
      Now .fetchone() is called on the cursor.
      We could wrap .fetchone() and reconnect, but we'd have to use a new cursor since
      cursors are linked to connections. And on this new cursor .fetchone() wouldn't
      make any sense, since we haven't executed a query on this cursor.
      e03f5d0a
  18. 08 Dec, 2019 3 commits
  19. 04 Dec, 2019 1 commit
  20. 19 Sep, 2019 1 commit
  21. 16 Jul, 2019 1 commit
  22. 24 Apr, 2019 1 commit
  23. 31 Mar, 2019 1 commit