New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Singleton]
and [Disable]
attributes don't work
#735
Comments
This seems related to #274 . |
And #312 |
Any news on this? |
I'm actually quite shocked that this is still an issue, net 7 is out and people are encouraged to move to the out of process model, to utilise net 7 but the basic disable ability is still lacking. From what i can see, the current workaround is not really suitable as although everyone keeps mentioning appsettings, which is only a fudge while your on the app service itself, this wont work locally. For local, if your using appsetting overrides correctly then being restricted to only disabling the job via local.settings.json doesnt help either. The reason we use the disable attribute originally was to ensure for particular environments, these functions don't run. Having to modify settings on the infrastructure for each app service, everytime a new function is added to the project, which we don't want running, seems like quite an oversight. Do we know if theres a fix or workaround yet? I tried looking into overriding the function attribute itself to not pass the function name in if its in config but as atttributes are not really designed for DI, its tricky. |
We managed to write our own singleton functionality (single instance though, not distributed, that would require more work) which I posted the gist of here: #938 (comment) It's nowhere near as featureful as the old singleton attribute was, but it gets the job done. |
Hi everyone, I just wanted to ask if there's a place where one could track progress (or lack thereof) around this issue. With WebJobs 3.x not allowing manual job function execution, I'd like to migrate to a function app. I do, however, have a couple of functions that must remain singletons. Thanks in advance. |
Closing as dupe of #312 (it also mentions Singleton) |
After upgrading to the new azure functions worker runtime, I noticed that both the
[Singleton]
and[Disable]
attributes don't work.Looks like there is a workaround for the
[Disable]
attribute by having a setting.Is there a workaround for having functions be singleton?
The text was updated successfully, but these errors were encountered: