settings.py 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. """
  2. ForgeFed plugin for Pagure.
  3. Copyright (C) 2020-2021 zPlus <zplus@peers.community>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License along
  13. with this program; if not, see <https://www.gnu.org/licenses/>.
  14. SPDX-FileCopyrightText: 2020-2021 zPlus <zplus@peers.community>
  15. SPDX-License-Identifier: GPL-2.0-only
  16. """
  17. # How many items to show for collections, eg. as:followers and as:inbox. If a
  18. # collection contains more than COLLECTION_SIZE it will be paginated.
  19. COLLECTION_SIZE = 100
  20. # Actors use RSA keys to sign HTTP POST requests. These keys are automatically
  21. # created for actors.
  22. HTTP_SIGNATURE_KEY_BITS = 2048
  23. # When an Activity is sent to a remote object, that object can be an Actor or a
  24. # Collection containing other objects. Because collections can contain other
  25. # collections, we could get stuck into recursion, or go "too deep" with the list
  26. # of receivers (ie. followers of followers of followers...). This option sets
  27. # the maximum number of indirections that we follow when sending an Activity.
  28. # https://www.w3.org/TR/activitypub/#delivery
  29. #
  30. # Examples:
  31. # 0 = Send only to actual actors with an immediate INBOX, do not expand any
  32. # Collection
  33. # 1 = Send to actors and immediate Collections only (eg. as:followers). If
  34. # followers contains another Collection, the latter won't be searched
  35. # 2 = Expand collections inside other collections
  36. DELIVERY_DEPTH = 1
  37. # The plugin makes use of the Python logging module. This variable sets the
  38. # level of logging that should be produced. A log level is essentially a
  39. # natural number. The logs with a value greater than or equal to LOG_LEVEL will
  40. # be printed, all the others will be ignored.
  41. # https://docs.python.org/3/library/logging.html#levels
  42. import logging
  43. LOG_LEVEL=logging.DEBUG
  44. # This is required during plugin initialization to find the pagure templates
  45. # folder.
  46. # It is also required for the "tasks" package. When the celery task is started
  47. # from the command line, it does not know where the pagure folder is because
  48. # it's a standalone process.
  49. PAGURE_PATH='/home/git/pagure'