Merge branch 'dev_trustie' of http://gitea.trustie.net/jasder/forgeplus into dev_trustie

This commit is contained in:
Jasder
2020-07-14 15:11:40 +08:00
11 changed files with 471 additions and 11 deletions

View File

@@ -18,7 +18,6 @@ class Project < ApplicationRecord
has_many :project_trends, dependent: :destroy
has_many :watchers, as: :watchable, dependent: :destroy
has_many :fork_users, dependent: :destroy
# has_many :commits, dependent: :destroy
has_one :project_score, dependent: :destroy

11
app/models/sync_log.rb Normal file
View File

@@ -0,0 +1,11 @@
class SyncLog
def self.sync_log(message=nil)
@my_log ||= Logger.new("#{Rails.root}/log/sync.log")
@my_log.debug(message) unless message.nil?
end
def self.sync_project_log(message=nil)
@my_log ||= Logger.new("#{Rails.root}/log/sync_error_project.log")
@my_log.debug(message) unless message.nil?
end
end