Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

feat: exposes additional worker configuration parameters #268

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cofin
Copy link
Collaborator

@cofin cofin commented Jan 22, 2023

This enhancement exposes the following parameters on the create_worker_instance:

  • concurrency (also added to settings.WorkerSettings.CONCURRENCY)
  • cron_jobs
  • startup
  • shutdown

@cofin cofin requested review from gazorby and peterschutt January 22, 2023 16:16
Copy link
Member

@peterschutt peterschutt left a comment

Choose a reason for hiding this comment

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

Thanks!!

@@ -74,13 +74,14 @@ redis = { version = "*", optional = true }
saq = { version = "^0.9.1", optional = true }
sentry-sdk = { version = "*", optional = true }
sqlalchemy = { version = "==2.0.0rc3", optional = true }
greenlet = {version = "*", platform = "darwin", optional = true }
Copy link
Member

Choose a reason for hiding this comment

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

Is this for this?

sqlalchemy/sqlalchemy#7714

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is, I didn't think to look for an open issue on this.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if the issue is arm64 in general, or just M1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe this is going to be an M1/OSX only specific issue. I'd bet that the x86 OSX laptops probably do not have this issue. Is there a way to specify architecture as well?

Copy link
Member

Choose a reason for hiding this comment

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

I don't know - we are considering moving our workloads onto https://aws.amazon.com/ec2/graviton/ - so I might just spin one up and see if it gets the same treatment as m1

Comment on lines +142 to +143
class CronJob(saq.CronJob):
"""Cron Job."""
Copy link
Member

Choose a reason for hiding this comment

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

is this for anything?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's main purpose now is for for convenience. (i.e. you can import all of the classes from worker instead of having to import from saq as well). I thought I might need to add additional functionality there, but I'm not sure at this point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants