Fixed missing require for scheduler.
This commit is contained in:
parent
b5c07f089c
commit
4bf0101097
2 changed files with 26 additions and 24 deletions
|
@ -1,3 +1,5 @@
|
|||
require 'scheduler'
|
||||
require 'setting'
|
||||
class SchedulerCreate < ActiveRecord::Migration
|
||||
def up
|
||||
create_table :schedulers do |t|
|
||||
|
@ -14,6 +16,30 @@ class SchedulerCreate < ActiveRecord::Migration
|
|||
t.timestamps
|
||||
end
|
||||
add_index :schedulers, [:name], :unique => true
|
||||
Scheduler.create(
|
||||
:name => 'Check Channels',
|
||||
:method => 'Channel.fetch',
|
||||
:period => 30,
|
||||
:active => true,
|
||||
:updated_by_id => 1,
|
||||
:created_by_id => 1,
|
||||
)
|
||||
Scheduler.create(
|
||||
:name => 'Import OTRS diff load',
|
||||
:method => 'Import::OTRS.diff_loop',
|
||||
:period => 60 * 10,
|
||||
:active => true,
|
||||
:updated_by_id => 1,
|
||||
:created_by_id => 1,
|
||||
)
|
||||
Scheduler.create(
|
||||
:name => 'Generate Session data',
|
||||
:method => 'Session.jobs',
|
||||
:period => 60,
|
||||
:active => true,
|
||||
:updated_by_id => 1,
|
||||
:created_by_id => 1,
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
|
|
|
@ -1,29 +1,5 @@
|
|||
class UpdateSla < ActiveRecord::Migration
|
||||
def up
|
||||
Scheduler.create(
|
||||
:name => 'Check Channels',
|
||||
:method => 'Channel.fetch',
|
||||
:period => 30,
|
||||
:active => true,
|
||||
:updated_by_id => 1,
|
||||
:created_by_id => 1,
|
||||
)
|
||||
Scheduler.create(
|
||||
:name => 'Import OTRS diff load',
|
||||
:method => 'Import::OTRS.diff_loop',
|
||||
:period => 60 * 10,
|
||||
:active => true,
|
||||
:updated_by_id => 1,
|
||||
:created_by_id => 1,
|
||||
)
|
||||
Scheduler.create(
|
||||
:name => 'Generate Session data',
|
||||
:method => 'Session.jobs',
|
||||
:period => 60,
|
||||
:active => true,
|
||||
:updated_by_id => 1,
|
||||
:created_by_id => 1,
|
||||
)
|
||||
add_column :slas, :first_response_time, :integer, :null => true
|
||||
add_column :slas, :update_time, :integer, :null => true
|
||||
add_column :slas, :close_time, :integer, :null => true
|
||||
|
|
Loading…
Reference in a new issue