Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
def add_custom_task_batch_actions batch_action( :execute_custom_task, form: -> { tasks = CustomTask.where("? = ANY(input_record_types)", resource_class.name) { custom_task_id: tasks.map { |t| [t.name, t.id] } } }) do |ids, inputs| custom_task = CustomTask.find(inputs[:custom_task_id]) background_job = CustomTaskWorker.perform_async( custom_task.id, resource_class.name, ids, name: custom_task.name, custom_task_id: custom_task.id ) redirect_to( admin_background_job_path(background_job), notice: "Your custom task is being executed in the background." ) end end
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)