mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-10 01:19:45 +08:00
Merge pull request #4598 from okriuchykhin/ok_SCI_7435
Fix Fluics templates sync scheduler [SCI-7435]
This commit is contained in:
commit
e13cfa2c74
1 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ require 'rufus-scheduler'
|
||||||
|
|
||||||
scheduler = Rufus::Scheduler.singleton
|
scheduler = Rufus::Scheduler.singleton
|
||||||
|
|
||||||
if ENV['ENABLE_TEMPLATES_SYNC']
|
if ENV['ENABLE_TEMPLATES_SYNC'] == 'true'
|
||||||
# Templates sync periodic task
|
# Templates sync periodic task
|
||||||
scheduler.every '12h' do
|
scheduler.every '12h' do
|
||||||
Rails.logger.info('Templates, syncing all template projects')
|
Rails.logger.info('Templates, syncing all template projects')
|
||||||
|
@ -33,8 +33,8 @@ if Rails.application.secrets.system_notifications_uri.present? &&
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV['ENABLE_FLUICS_SYNC'] && LabelPrinter.fluics.any?
|
if ENV['ENABLE_FLUICS_SYNC'] == 'true'
|
||||||
scheduler.every '24h' do
|
scheduler.every '24h' do
|
||||||
LabelPrinters::Fluics::SyncService.new.sync_templates!
|
LabelPrinters::Fluics::SyncService.new.sync_templates! if LabelPrinter.fluics.any?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue