Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrease nextcould sync debounce time to 5 secs. #13183

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#++

class Storages::ManageNextcloudIntegrationEventsJob < ApplicationJob
DEBOUNCE_TIME = 20.seconds.freeze
DEBOUNCE_TIME = 5.seconds.freeze

def self.debounce
count = Delayed::Job
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
ActiveJob::Base.disable_test_adapter

other_handler = Storages::ManageNextcloudIntegrationCronJob.perform_later.provider_job_id
same_handler_within_timeframe1 = described_class.set(wait: 10.seconds).perform_later.provider_job_id
same_handler_within_timeframe2 = described_class.set(wait: 12.seconds).perform_later.provider_job_id
same_handler_within_timeframe3 = described_class.set(wait: 16.seconds).perform_later.provider_job_id
same_handler_within_timeframe1 = described_class.set(wait: 1.seconds).perform_later.provider_job_id

Check failure on line 37 in modules/storages/spec/workers/storages/manage_nextcloud_integration_events_job_spec.rb

View workflow job for this annotation

GitHub Actions / rubocop

[rubocop] modules/storages/spec/workers/storages/manage_nextcloud_integration_events_job_spec.rb#L37

[Correctable] Rails/PluralizationGrammar: Prefer 1.second.
Raw output
modules/storages/spec/workers/storages/manage_nextcloud_integration_events_job_spec.rb:37:66: C: [Correctable] Rails/PluralizationGrammar: Prefer 1.second.
      same_handler_within_timeframe1 = described_class.set(wait: 1.seconds).perform_later.provider_job_id
                                                                 ^^^^^^^^^
same_handler_within_timeframe2 = described_class.set(wait: 2.seconds).perform_later.provider_job_id
same_handler_within_timeframe3 = described_class.set(wait: 3.seconds).perform_later.provider_job_id
same_handler_out_of_timeframe = described_class.set(wait: 1.minute).perform_later.provider_job_id
same_handler_within_timeframe_in_progress = described_class.set(wait: 18.seconds).perform_later.tap do |job|
# simulate in progress state
Expand Down
Loading