22
33module Efile
44 class GyrEfilerService
5- CURRENT_VERSION = 'ae332c44bac585fb9dbec9bf32ffff0d34a72830'
65 POSTGRES_LOCK_PREFIX = 1640661264
76 RETRYABLE_LOG_CONTENTS = [
87 /Transaction Result: The server sent HTTP status code 302: Moved Temporarily/ ,
@@ -18,6 +17,14 @@ class GyrEfilerService
1817 /HTTP transport error: javax.net.ssl.SSLException/ ,
1918 ]
2019
20+ def self . current_version
21+ if Rails . env . production? && Date . today . year < 2026
22+ 'ae332c44bac585fb9dbec9bf32ffff0d34a72830'
23+ else
24+ '8c46c9dccfc4da4b0acec5813966b1ba68abe245'
25+ end
26+ end
27+
2128 def self . run_efiler_command ( *args )
2229 Dir . mktmpdir do |working_directory |
2330 FileUtils . mkdir_p ( File . join ( working_directory , "output" , "log" ) )
@@ -80,7 +87,7 @@ def self.ensure_config_dir_prepared
8087 FileUtils . mkdir_p ( config_dir )
8188 return if File . exist? ( File . join ( config_dir , '.ready' ) )
8289
83- config_zip_path = Dir . glob ( Rails . root . join ( "vendor" , "gyr_efiler" , "gyr-efiler-config-#{ CURRENT_VERSION } .zip" ) ) [ 0 ]
90+ config_zip_path = Dir . glob ( Rails . root . join ( "vendor" , "gyr_efiler" , "gyr-efiler-config-#{ current_version } .zip" ) ) [ 0 ]
8491 raise StandardError . new ( "Please run rake setup:download_gyr_efiler then try again" ) if config_zip_path . nil?
8592
8693 system! ( "unzip -o #{ config_zip_path } -d #{ Rails . root . join ( "tmp" , "gyr_efiler" ) } " )
@@ -108,7 +115,7 @@ def self.ensure_config_dir_prepared
108115 end
109116
110117 def self . ensure_gyr_efiler_downloaded
111- classes_zip_path = Dir . glob ( Rails . root . join ( "vendor" , "gyr_efiler" , "gyr-efiler-classes-#{ CURRENT_VERSION } .zip" ) ) [ 0 ]
118+ classes_zip_path = Dir . glob ( Rails . root . join ( "vendor" , "gyr_efiler" , "gyr-efiler-classes-#{ current_version } .zip" ) ) [ 0 ]
112119 raise StandardError . new ( "You must run rails setup:download_gyr_efiler" ) if classes_zip_path . nil?
113120
114121 return classes_zip_path
0 commit comments