mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
adjust documents sync
This commit is contained in:
1 parent
be196b2bcb
commit
90e1aa606e
1 file changed
+3
-3
@@ -11,10 +11,10 @@ module Submissions
|
||||
module_function
|
||||
|
||||
def call(submitter)
|
||||
return submitter.documents if submitter.document_generation_events.complete.exists?
|
||||
return submitter.documents if ApplicationRecord.uncached { submitter.document_generation_events.complete.exists? }
|
||||
|
||||
events =
|
||||
DocumentGenerationEvent.uncached do
|
||||
ApplicationRecord.uncached do
|
||||
DocumentGenerationEvent.where(submitter:).order(:created_at).to_a
|
||||
end
|
||||
|
||||
@@ -45,7 +45,7 @@ module Submissions
|
||||
total_wait_time += CHECK_EVENT_INTERVAL
|
||||
|
||||
last_event =
|
||||
DocumentGenerationEvent.uncached do
|
||||
ApplicationRecord.uncached do
|
||||
DocumentGenerationEvent.where(submitter:).order(:created_at).last
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user