Browse Source

change jobs

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
7a0106578b
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      app/jobs/sync_projects_job.rb

+ 5
- 3
app/jobs/sync_projects_job.rb View File

@@ -1,9 +1,9 @@
require 'uri'
require 'net/http'

class SyncProjectsJob < ApplicationJob
queue_as :default

require 'uri'
require 'net/http'

def perform(sync_params)
SyncLog.sync_log("==========begin to sync #{sync_params[:type]} to forge============")
begin
@@ -41,6 +41,8 @@ class SyncProjectsJob < ApplicationJob
end
end

private

def update_new_project(re, project_id)
project = Project.find_by(id: project_id)
project.update(re[:target_params].compact!) if re[:target_params].present?


Loading…
Cancel
Save