我整合了 apartment-sidekiq
在我的多租户rails应用中,但它在sidekiq.log中记录了以下问题。自定义邮件都能完美处理,但似乎是active_storage作业的问题,为什么它试图找到不存在的目录?我手动检查了目录,但它不在那里,(有时,worker会在保存记录之前找到记录,但这里似乎不是这样),它是否试图在其他租户中找到路径?
我使用的是Rails 5.2,ruby 2.3.1。
2019-08-15T06:58:14.857Z 12629 TID-137g5x ActiveStorage::AnalyzeJob JID-2555d469bbee6a7b618446d3 INFO: start
2019-08-15T06:58:15.968Z 12629 TID-137g5x ActiveStorage::AnalyzeJob JID-2555d469bbee6a7b618446d3 INFO: fail: 1.121 sec
2019-08-15T06:58:15.973Z 12629 TID-137g5x WARN: {"context":"Job raised exception","job":{"class":"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper","wrapped":"ActiveStorage::AnalyzeJob","queue":"default","args":[{"job_class":"ActiveStorage::AnalyzeJob","job_id":"30a39eff-b93f-41b3-8d0f-aae6e070c4c7","provider_job_id":null,"queue_name":"default","priority":null,"arguments":[{"_aj_globalid":"gid://flap/ActiveStorage::Blob/5"}],"executions":0,"locale":"en"}],"retry":true,"jid":"2555d469bbee6a7b618446d3","created_at":1565789876.7082293,"apartment":"tenant_name","enqueued_at":1565852294.8079991,"error_message":"No such file or directory @ rb_sysopen - /abc/flapp-cap/releases/20190814172709/storage/Ma/xS/MaxSwEqwUMV5WFG35Kz7qMLy","error_class":"Errno::ENOENT","failed_at":1565789876.718125,"retry_count":12,"retried_at":1565831257.7109427},"jobstr":"{\"class\":\"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper\",\"wrapped\":\"ActiveStorage::AnalyzeJob\",\"queue\":\"default\",\"args\":[{\"job_class\":\"ActiveStorage::AnalyzeJob\",\"job_id\":\"30a39eff-b93f-41b3-8d0f-aae6e070c4c7\",\"provider_job_id\":null,\"queue_name\":\"default\",\"priority\":null,\"arguments\":[{\"_aj_globalid\":\"gid://flapp/ActiveStorage::Blob/5\"}],\"executions\":0,\"locale\":\"en\"}],\"retry\":true,\"jid\":\"2555d469bbee6a7b618446d3\",\"created_at\":1565789876.7082293,\"apartment\":\"tenant_name\",\"enqueued_at\":1565852294.8079991,\"error_message\":\"No such file or directory @ rb_sysopen - /abc/flapp-bc/cap/releases/20190814172709/storage/Ma/xS/MaxSwEqwUMV5WFG35Kz7qMLy\",\"error_class\":\"Errno::ENOENT\",\"failed_at\":1565789876.718125,\"retry_count\":12,\"retried_at\":1565831257.7109427}"}
2019-08-15T06:58:15.973Z 12629 TID-137g5x WARN: Errno::ENOENT: No such file or directory @ rb_sysopen - /abc/flapp/storage/cW/J7/cWJ7vKtzyfDNMHmtYV8ckErR