File tree Expand file tree Collapse file tree 2 files changed +34
-17
lines changed Expand file tree Collapse file tree 2 files changed +34
-17
lines changed Original file line number Diff line number Diff line change @@ -682,23 +682,7 @@ def get_env(self) -> dict:
682
682
config [alias ] = getattr (self ._configuration , field_name )
683
683
684
684
env_vars = {env_var .value .lower (): env_var .name .lower () for env_var in [* ActorEnvVars , * ApifyEnvVars ]}
685
- result = {option_name : config [env_var ] for env_var , option_name in env_vars .items () if env_var in config }
686
-
687
- # These environment variables are not part of the Configuration model,
688
- # so we need to add them manually to the result dictionary.
689
- result [ActorEnvVars .DEFAULT_DATASET_ID .name .lower ()] = os .environ .get (
690
- ActorEnvVars .DEFAULT_DATASET_ID .value
691
- ) or os .environ .get (ApifyEnvVars .DEFAULT_DATASET_ID .value )
692
-
693
- result [ActorEnvVars .DEFAULT_KEY_VALUE_STORE_ID .name .lower ()] = os .environ .get (
694
- ActorEnvVars .DEFAULT_KEY_VALUE_STORE_ID .value
695
- ) or os .environ .get (ApifyEnvVars .DEFAULT_KEY_VALUE_STORE_ID .value )
696
-
697
- result [ActorEnvVars .DEFAULT_REQUEST_QUEUE_ID .name .lower ()] = os .environ .get (
698
- ActorEnvVars .DEFAULT_REQUEST_QUEUE_ID .value
699
- ) or os .environ .get (ApifyEnvVars .DEFAULT_REQUEST_QUEUE_ID .value )
700
-
701
- return result
685
+ return {option_name : config [env_var ] for env_var , option_name in env_vars .items () if env_var in config }
702
686
703
687
async def start (
704
688
self ,
Original file line number Diff line number Diff line change @@ -140,6 +140,39 @@ class Configuration(CrawleeConfiguration):
140
140
),
141
141
] = None
142
142
143
+ default_dataset_id : Annotated [
144
+ str ,
145
+ Field (
146
+ validation_alias = AliasChoices (
147
+ 'actor_default_dataset_id' ,
148
+ 'apify_default_dataset_id' ,
149
+ ),
150
+ description = 'Default dataset ID used by the Apify storage client when no ID or name is provided.' ,
151
+ ),
152
+ ] = 'default'
153
+
154
+ default_key_value_store_id : Annotated [
155
+ str ,
156
+ Field (
157
+ validation_alias = AliasChoices (
158
+ 'actor_default_key_value_store_id' ,
159
+ 'apify_default_key_value_store_id' ,
160
+ ),
161
+ description = 'Default key-value store ID for the Apify storage client when no ID or name is provided.' ,
162
+ ),
163
+ ] = 'default'
164
+
165
+ default_request_queue_id : Annotated [
166
+ str ,
167
+ Field (
168
+ validation_alias = AliasChoices (
169
+ 'actor_default_request_queue_id' ,
170
+ 'apify_default_request_queue_id' ,
171
+ ),
172
+ description = 'Default request queue ID for the Apify storage client when no ID or name is provided.' ,
173
+ ),
174
+ ] = 'default'
175
+
143
176
disable_outdated_warning : Annotated [
144
177
bool ,
145
178
Field (
You can’t perform that action at this time.
0 commit comments