Skip to content

Background jobs#122

Open
Sarah Smulligan (Smullz622) wants to merge 4 commits intomainfrom
background-jobs
Open

Background jobs#122
Sarah Smulligan (Smullz622) wants to merge 4 commits intomainfrom
background-jobs

Conversation

@Smullz622
Copy link
Copy Markdown
Contributor

Sets up sidekiq and changes how create user integration works so it runs as a background job.

This technically works at this point, but there are some improvements I'd like to make regarding how we handle files (perform_later doesn't accept all of the same arguments types that perform_now does which causes some problems here). I will document further in a future ticket, but I wanted to get a workable solution out there so Nicole can use this tool.

class ConcurrentJobsError < StandardError; end

before_perform :prevent_concurrent_jobs, :integration_start, :clear_tmp_files, :delete_all_data
before_perform :prevent_concurrent_jobs, :integration_start, :delete_all_data
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to add before_perform :clear_tmp_files directly to the Jobs we intend to keep running synchronously. Just to make sure that directory is cleared before those run.

@@ -0,0 +1,7 @@
Sidekiq.configure_server do |config|
config.redis = { url: ENV.fetch('SIDEKIQ_REDIS_URL') { 'redis://localhost:6379/0' } }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to configure this variable in k8s when the redis instance is set up.

@ajkiessl
Copy link
Copy Markdown
Contributor

We'll need to get a redis and sidekiq instance set up in k8s to get this to work in QA/prod. I have a comment in the issue here: #120 (comment) about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants