File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,21 @@ def validate_triclops_config!
33
33
raise "Missing required config TRICLOPS[:config][:#{ required_key } ]"
34
34
end
35
35
end
36
-
37
- # If temp_directory is not set, default to ruby temp dir
38
- TRICLOPS [ :tmp_directory ] = Dir . tmpdir if TRICLOPS [ :tmp_directory ] . nil?
39
36
end
40
37
41
38
# Raster cache config validation
42
39
Rails . application . config . after_initialize do
43
40
# We need to run this after_initialize because at least one of our validations depends on
44
41
# a constant from an auto-loaded file, and modules are only auto-loaded after initialization.
45
42
validate_triclops_config!
43
+
44
+ # If temp_directory is not set, default to ruby temp dir
45
+ TRICLOPS [ :tmp_directory ] = Dir . tmpdir if TRICLOPS [ :tmp_directory ] . nil?
46
+
47
+ # Set the TMPDIR ENV variable so that Vips (via Imogen) writes temp files here.
48
+ # This defaults to the OS temp directory if not otherwise set, which can be a
49
+ # problem if we're on a host that has limited local disk space.
50
+ ENV [ 'TMPDIR' ] = TRICLOPS [ :tmp_directory ]
46
51
end
47
52
48
53
Rails . application . config . active_job . queue_adapter = :inline if TRICLOPS [ 'run_queued_jobs_inline' ]
You can’t perform that action at this time.
0 commit comments