rails_execution 0.1.7 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc70b3d37b0f57026b998e198b741809e74f194ec4368796ee7de56e54ad8aff
4
- data.tar.gz: 0a6b47c6dc13ca92c1d53cce6c3bbce0a2af6532a74cda69755e611e92cb8569
3
+ metadata.gz: 176aa147a9e384a353c1f435063461d203a6c4de3676889e6cb7f71a4a096ed3
4
+ data.tar.gz: 0ffe2b599d50639b46a02e13b520e22ef67a41da3b1967336072a623d1e06b15
5
5
  SHA512:
6
- metadata.gz: 1de3ee343da5c3b7848fb9628beda7d5f5c2a7a69c61577c08af0a5aff7faf949d9859ecf5d312e280e245ba9e4f50cbc574a70d59c44afc6ceb238407aa708f
7
- data.tar.gz: 35c3ff052ca5510d2c27f02535aef0b2df7687727360052354f989345332d9c8ccbba0be71206b95f825a41e99581eb78213f521c8093a16491a0345c67a3cf6
6
+ metadata.gz: '039e5794a629deeaca5552c77d29ea044863219744819ee451bbbbfdc45f9a990ad02342b7a1675942eba2d7c5333c2ff42a3cfcf2610c93b42003e39cdbcc5b'
7
+ data.tar.gz: 0b1e9d0010126b51b2990cc9dc45e78ad812790096123a30a8d4051a3cdad9c4c5e5974fc917c4a9f3ea61af8c93e4994b5817a26b7f81ef2cfb9b241c24aaeb
@@ -1,3 +1,3 @@
1
1
  - if task_attachment_files.any?
2
2
  = re_card_content do
3
- = render partial: 'attachments', locals: { task_attachment_files: }
3
+ = render partial: 'attachments', locals: { task_attachment_files: task_attachment_files }
@@ -31,7 +31,7 @@
31
31
  = f.datetime_local_field :scheduled_at, class: "form-control", placeholder: "Select Datetime"
32
32
  = f.select :repeat_mode, options_for_select(task.repeat_mode_select_options.invert, f.object.repeat_mode), {}, class: "form-control", disabled: !task.scheduled_at?
33
33
  - if RailsExecution.configuration.file_upload
34
- .mt-4= render partial: 'attachments', locals: { task_attachment_files: }
34
+ .mt-4= render partial: 'attachments', locals: { task_attachment_files: task_attachment_files }
35
35
  #attachment_files.mb-3
36
36
  %ul.list-unstyled= render partial: 'attachment_file_fields'
37
37
 
@@ -33,7 +33,7 @@ module RailsExecution
33
33
  attr_reader :task
34
34
 
35
35
  def save_to_tempfile(file_name, url)
36
- file = open(url)
36
+ file = URI.open(url)
37
37
  return file if file.is_a?(Tempfile)
38
38
 
39
39
  raise "Unsupported the Filetype #{file.class.name}" unless file.is_a?(StringIO)
@@ -44,6 +44,9 @@ module RailsExecution
44
44
  class #{class_name} < ::RailsExecution::Services::Executor
45
45
  def call
46
46
  task.with_lock do
47
+ stop!('Task is being executed by another process') if task.is_processing?
48
+
49
+ task.update!(status: :processing)
47
50
  #{task.script}
48
51
  end
49
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsExecution
4
- VERSION = '0.1.7'
4
+ VERSION = '0.1.9'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Khoa Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-17 00:00:00.000000000 Z
11
+ date: 2024-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml