Runtime Environment Variable in Autotask to Identify which Autotask Is Running?

:computer: Environment
Autotask

:memo:Details
I'm running the approximately same Autotask across three environment - development, production, and staging.

These of course have different contract addresses with which they interact.

I have three secrets with the address - e.g. DEVELOPMENT_ADDRESS, STAGING_ADDRESS, etc.

Rather than hardcoding which env var to pull from and then pushing the code to the respective autotask, I was wondering if there was a kind of "introspective" way I could tell which autotask is running at runtime and dynamically choose which env var among the three to choose?

This would greatly simplify our DevOps cycle using OZ Defender Autotask, since promoting our oracle changes through environments wouldn't require manual changes.

Thanks!

Why didn't anyone helped here ? is there any update about it ?

In the end what I did is either check the autotaskId which is available, or the sentinelId. And from that I can know which one is running

it's on event.autotaskId

I think event.autotaskId would be the most sensible param to use for this (or event.autotaskName, but note name is not guaranteed to be unique)