1. 09 Mar, 2022 1 commit
  2. 23 Feb, 2022 1 commit
  3. 10 Feb, 2022 2 commits
  4. 18 Jan, 2022 1 commit
  5. 14 Jan, 2022 2 commits
  6. 30 Nov, 2021 2 commits
  7. 17 Nov, 2021 1 commit
    • Kevin Morris's avatar
      fix(rpc): improve type=info performance · abe8c063
      Kevin Morris authored
      
      
      Now, we use an equivalent query to PHP's query, yet we grab
      every piece of data we need for all packages asked for in one
      database query.
      
      At this time, local benchmarks have shown a slight performance
      improvement when compared to PHP.
      
      fastapi 262 requests/sec
      php 250 requests/sec
      
      Extras:
      
      - Moved RPCError to the aurweb.exceptions module
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      abe8c063
  8. 15 Nov, 2021 1 commit
    • Kevin Morris's avatar
      housekeep(fastapi): rework aurweb.db session API · 4103ab49
      Kevin Morris authored
      
      
      Changes:
      -------
      - Add aurweb.db.get_session()
          - Returns aurweb.db's global `session` instance
          - Provides us a way to change the implementation of the session
            instance without interrupting user code.
      - Use aurweb.db.get_session() in session API methods
      - Add docstrings to session API methods
      - Refactor aurweb.db.delete
          - Normalize aurweb.db.delete to an alias of session.delete
      - Refresh instances in places we depend on their non-PK columns
        being up to date.
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      4103ab49
  9. 31 Oct, 2021 5 commits
  10. 30 Oct, 2021 3 commits
  11. 21 Oct, 2021 3 commits
    • Kevin Morris's avatar
      change(rpc): handle 'version' and 'type' arguments in constructor · 66629750
      Kevin Morris authored
      
      
      Additionally, added RPC.error, which produces an RPC-compatible
      error based on the version passed during construction.
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      66629750
    • Kevin Morris's avatar
      change(fastapi): rework /rpc (get) · 7c4fb539
      Kevin Morris authored
      
      
      This reworks the base implementation of the RPC to use a
      class called RPC for handling of requests. Took a bit of
      a different approach than PHP in terms of exposed methods,
      but it does end up achieving the same goal, with one additional
      error: "Request type '{type}' is not yet implemented."
      
      For FastAPI development, we'll stick with:
      
      - If the supplied 'type' argument has an alias mapping in
        RPC.ALIASES, we convert the type argument over to its alias
        before doing anything. Example: 'info' is aliased to 'multiinfo',
        so when a user requests type=info, it is converted to type=multiinfo.
      - If the type does not exist in RPC.EXPOSED_TYPES, the following
        error is produced: "No request type/data specified."
      - If the type **does** exist in RPC.EXPOSED_TYPES, but does not
        have an implemented `RPC._handle_{type}_type` function, the
        following error is produced: "Request type '{type}' is not yet
        implemented."
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      7c4fb539
    • Kevin Morris's avatar
      feat(rpc): add 'suggest-pkgbase' type · 990f4d18
      Kevin Morris authored
      
      
      This feature of RPC is required to take advantage of
      javascript typeahead.
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      990f4d18
  12. 17 Oct, 2021 1 commit
  13. 17 Sep, 2021 1 commit
  14. 16 Sep, 2021 2 commits
  15. 12 Sep, 2021 1 commit