-
-
Notifications
You must be signed in to change notification settings - Fork 902
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avo actions to enqueue compact index file upload jobs (#3970)
- Loading branch information
Showing
5 changed files
with
62 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class UploadInfoFile < BaseAction | ||
self.name = "Upload Info File" | ||
self.visible = lambda { | ||
current_user.team_member?("rubygems-org") && view == :show | ||
} | ||
self.confirm_button_label = "Upload" | ||
|
||
class ActionHandler < ActionHandler | ||
def handle_model(rubygem) | ||
UploadInfoFileJob.perform_later(rubygem_name: rubygem.name) | ||
|
||
succeed("Upload job scheduled") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class UploadVersionsFile < BaseAction | ||
self.name = "Upload Versions File" | ||
self.visible = lambda { | ||
current_user.team_member?("rubygems-org") && view == :index | ||
} | ||
self.standalone = true | ||
self.confirm_button_label = "Upload" | ||
|
||
class ActionHandler < ActionHandler | ||
def handle_standalone | ||
UploadVersionsFileJob.perform_later | ||
|
||
succeed("Upload job scheduled") | ||
|
||
Version.last | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters