18 lines
499 B
Ruby
18 lines
499 B
Ruby
![]() |
class ImapAuthenticationMigrationCleanupJobScheduler < ActiveRecord::Migration[5.2]
|
||
|
def change
|
||
|
|
||
|
# return if it's a new setup
|
||
|
return if !Setting.find_by(name: 'system_init_done')
|
||
|
|
||
|
Scheduler.create_or_update(
|
||
|
name: 'Delete obsolete classic IMAP backup.',
|
||
|
method: 'ImapAuthenticationMigrationCleanupJob.perform_now',
|
||
|
period: 1.day,
|
||
|
prio: 2,
|
||
|
active: true,
|
||
|
updated_by_id: 1,
|
||
|
created_by_id: 1,
|
||
|
)
|
||
|
end
|
||
|
end
|