message<<"<br>To discard the local changes and overwrite the branch with the upstream version, delete it here and choose 'Update Now' above."ifcan?(current_user,:push_code,@project)
message<<"<br>To discard the local changes and overwrite the branch with the upstream version, delete it here and choose 'Update Now' above."ifcan?(current_user,:push_code,@project)
where("(import_status = 'started' AND project_mirror_data.last_update_started_at < :limit) OR (import_status = 'scheduled' AND project_mirror_data.last_update_scheduled_at < :limit)",
project.mark_import_as_failed('The mirror update took too long to complete.')
project.mark_import_as_failed('The mirror update took too long to complete.')
end
end
end
end
private
private
defmirrors_to_sync
deftry_obtain_lease
Project.mirror.where("mirror_last_successful_update_at + #{Gitlab::Database.minute_interval('sync_time')} <= ? OR sync_time IN (?)",DateTime.now,Gitlab::Mirror.sync_times)