how can I add job configurations to my deployment ...
# ask-community
f
how can I add job configurations to my deployment object if I wanna deploy it via a custom worker?
a
Hey @Farhood Etaati, this is a fascinating question! To make sure I understand the context, could you let me know the following: • Is the custom worker one that you created yourself? • What kind of job configuration do you want to set for the deployment?
f
Hi alex! • Yes, it's a custom worker that I've implemented and I've developed the configuration and variables classes for this worker. • I'm trying to pass a string to the worker to print before starting a flow, just to see how I can pass job configuration variables to the worker.
@alex sorry I forgot to mention you.
a
That’s very exciting that you’re working on developing your own worker! If you want to pass custom values for a deployment, you can specify those values as key/value pairs in the
work_pool.job_variables
section of your deployment configuration. Here’s a link to the reference for deployment configuration in the docs. The key in
job_variables
should match one of the attributes defined on your variables class for your worker. Depending on how your configuration class is set up, that value should be available on the
configuration
object passed into your worker’s
run
method.
👍 1