2023-07-18 18:47:26 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Permite pushear los cambios cada vez que se
|
|
|
|
# hacen commits en un sitio
|
|
|
|
class GitPushJob < ApplicationJob
|
|
|
|
# @param :site [Site]
|
|
|
|
# @return [nil]
|
|
|
|
def perform(site)
|
2024-03-27 16:36:56 +00:00
|
|
|
site.repository.push if site.repository.origin
|
2023-07-18 18:47:26 +00:00
|
|
|
end
|
2024-03-27 16:36:56 +00:00
|
|
|
|
|
|
|
# Reportar una sola vez para que podamos resolver el problema, pero
|
|
|
|
# reportarlo igual.
|
|
|
|
#
|
|
|
|
# @return [Bool]
|
2024-03-27 16:42:27 +00:00
|
|
|
def handle_error(_)
|
2024-03-27 16:36:56 +00:00
|
|
|
expire
|
|
|
|
end
|
|
|
|
end
|