Helix SwarmHelix Swarm

Setup.py.template

  • //
  • guest/
  • matt_albrecht/
  • scripts/
  • logDaemon/
  • Setup.py.template #6
  • View
  • Commits
  • Open Download .zip Download (4 KB)
  1. #
  2. # Sets up the Python settings
  3. #
  4. # Things to remember:
  5. # server: the live Perforce server. The Demon will be run from here.
  6. # backup: the Perforce server that will be updated. Must
  7. # not be live, or DB corruptions can occur.
  8.  
  9. POLL_INTERVAL = 2
  10. P4API = False
  11. DIE_ON_FATAL_ERROR = True
  12.  
  13. # details about the source server
  14. class SERVER:
  15. host = "@P4D_HOST@"
  16. journal = "@P4D_JOURNAL@"
  17. # Location of the journal file. The daemon will
  18. # append ".jnl.(sequencenumber)" (and .gz if it's compressed) to this
  19. # value.
  20. rotateJournal = "@P4D_ROTATE_JOURNAL@"
  21.  
  22. # Indicates the last checkpoint the remote server was restored from. Used
  23. # to know when to stop looking backwards through the Journal file. If
  24. # this is set to None, then the daemon will use the value of the
  25. # p4 counter 'remote-checkpoint', and if this is a string, then the
  26. # daemon will use the value of the p4 counter with that as the counter name.
  27. lastCheckpoint = @LAST_CHECKPOINT@
  28. # location of executable files
  29. P4 = "@P4D_P4@"
  30. P4D = "@P4D_P4D@"
  31. RSYNC = "rsync"
  32. SSH = "ssh"
  33. SCP = "scp"
  34. # location of data files
  35. datadir = "@P4D_LOGDIR@"
  36. # map from the depot name to the directory on the local server.
  37. depotDirs = {@DEPOT_SETTINGS@
  38. #'depot': '/usr/local/perforce/db/depot'
  39. }
  40. # Environment variables for running Perforce commands
  41. # The environment variable P4ENV contains a list of environment variable
  42. # names to add
  43. P4ENV = {@P4ENV_SETTINGS@
  44. }
  45. P4CMD = (
  46. "@P4D_P4@",
  47. "-p", "@P4D_PORT@",
  48. "-u", "@P4D_ADMINUSER@",
  49. "-P", "@P4D_ADMINPASSWD@"
  50. )
  51. # Defines maximum Journal entries to send via SSH to the hot backup server
  52. # per SSH connection.
  53. # By increasing this value, you make the Daemon more performant by pushing
  54. # a larger collection of Journal lines to the remote server. By decreasing
  55. # this value, you make the Daemon more defensive against critical failures.
  56. # If a critical failure happens to the logDaemon before these lines are
  57. # transmitted, they will be lost on the remote server.
  58. maxSSHLineTransfer = 5000
  59. # Defines maximum number of files to push over to the remote hot backup
  60. # server per RSync command.
  61. maxRSyncFileTransfer = 150
  62. pass
  63.  
  64. # details about the target server
  65. class BACKUP:
  66. # hostname or IP address of the backup server
  67. host = "@P4D_REMOTEHOST@"
  68. # user on the remote host, which will connect via SSH. An SSH Key
  69. # should be setup locally to allow for a non-password login.
  70. user = "@P4D_REMOTEUSER@"
  71. # map from the depot name to the directory on the remote server.
  72. depotDirs = {@REMOTEDEPOT_SETTINGS@
  73. #'depot': '/usr/local/perforce/db/depot'
  74. }
  75. # location of the P4D executable and any execution options
  76. P4D = ('@P4D_P4D@',
  77. '-r', '@P4D_REMOTEROOT@',
  78. '-J', '@P4D_JOURNAL@',
  79. '-L', '@P4D_LOG@'
  80. )
  81. # options for updating the journal from the live journal
  82. P4D_JOURNAL_OPTS = (
  83. '-f', '-jr',
  84. # read the fragment from stdin
  85. '-'
  86. )
  87. # Directory to store the checkpoint files that get copied from SERVER
  88. # for use in recovering from a checkpoint.
  89. # not needed at the moment
  90. # checkpointDir = '/var/p4d'
  91. pass
  92. class LOGGING:
  93. # The log file for this demon process
  94. logfile = "@P4D_LOGDIR@/logDaemon.log"
  95. # the format for the time. See
  96. # http://python.org/doc/2.2.3/lib/module-time.html#strftime
  97. # for details on the format
  98. timeFormat = "[%Y-%m-%d %H:%M:%S] "
  99. # 0 = FATAL
  100. # 1 = ERR
  101. # 2 = WARN
  102. # 3 = INFO
  103. # 4 = VERBOSE
  104. # 5 = DEBUG
  105. logLevel = 5
  106. adminEmail = '@P4D_ADMIN_EMAIL@'
  107. emailLogLevel = 1
  108. emailSubjectPrefix = '[P4 Journal Daemon]'
  109. emailErrorSubject = 'Execution Error'
  110. emailSender = '@P4D_EMAIL@'
  111. emailReplyTo = '@P4D_EMAIL_REPLYTO@'
  112. smtpHost = '@P4D_SMTP_HOST@'
  113. pass
  114.  
  115.  
  116. class JOURNAL:
  117. listeners = (
  118. 'hotbackup.RemoteUpdateJournal',
  119. 'hotbackup.RemoteUpdateDepot',
  120. 'metadatasync.RetrieveMetaChanges'
  121. # 'review.EmailChanges'
  122. )
  123. pass
  124.  
  125.  
  126. class METADATASYNC:
  127. # Map between the meta-data type and the path where it's located
  128. updateP4 = {
  129. 'groups': '//depot/meta-data/groups/'
  130. }
  131. pass
  132.  
# Change User Description Committed
#6 5850 Matt Albrecht Update logDaemon to version 1.5. 19 years ago
#5 5810 Matt Albrecht New version of logDaemon that has better bug fixes.
 Also added server-status web p...age for a pure client-side AJAX app that pulls together different server-side statistics. «
19 years ago
#4 5805 Matt Albrecht Update to version 1.3-alpha 19 years ago
#3 5788 Matt Albrecht Bug fixes to the logDaemon, bumping the version number to 1.2 19 years ago
#2 5780 Matt Albrecht Update tool with lots of goodies 19 years ago
#1 5424 Matt Albrecht Add a journal file daemon tool. 19 years ago