mirror of
https://github.com/plashchynski/crono.git
synced 2026-01-14 14:23:27 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7488df85b | ||
|
|
c777933044 | ||
|
|
0c2f52d9bc | ||
|
|
33e9794621 | ||
|
|
c336b6d00b |
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
crono (1.1.0)
|
||||
crono (1.1.2)
|
||||
activerecord (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@ module Crono
|
||||
attr_accessor :performer, :period, :job_args, :last_performed_at, :job_options,
|
||||
:next_performed_at, :job_log, :job_logger, :healthy, :execution_interval
|
||||
|
||||
def initialize(performer, period, job_args, job_options = {})
|
||||
def initialize(performer, period, job_args, job_options = nil)
|
||||
self.execution_interval = 0.minutes
|
||||
self.performer, self.period = performer, period
|
||||
self.job_args = JSON.generate(job_args)
|
||||
self.job_log = StringIO.new
|
||||
self.job_logger = Logger.new(job_log)
|
||||
self.job_options = job_options
|
||||
self.job_options = job_options || {}
|
||||
self.next_performed_at = period.next
|
||||
@semaphore = Mutex.new
|
||||
end
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module Crono
|
||||
VERSION = '1.1.0'
|
||||
VERSION = '1.1.2'
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@ class CreateCronoJobs < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :crono_jobs do |t|
|
||||
t.string :job_id, null: false
|
||||
t.text :log, limit: 4294967295 # LONGTEXT for MySQL
|
||||
t.text :log, limit: 1073741823 # LONGTEXT for MySQL
|
||||
t.datetime :last_performed_at
|
||||
t.boolean :healthy
|
||||
t.timestamps null: false
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
%a{ href: url('/') }
|
||||
%i.mdi-navigation-chevron-left
|
||||
Back to Home
|
||||
%h4 "#{@job.job_id}" Log:
|
||||
%h4 "#{@job.job_id}" Last log:
|
||||
|
||||
%main.container.blue-grey.lighten-4.grey-text.text-darken-4
|
||||
- if @job.healthy == false
|
||||
|
||||
Reference in New Issue
Block a user