-
Notifications
You must be signed in to change notification settings - Fork 22
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
Service.get_payload as an instance method #680
Comments
hmm.... there's an inherent problem here
anyway, to sum up, I'd say it's by design that the payload cannot differ on a per-instance basis |
you could create a factory that creates classes with an overridden class attribute which determines which image is deployed and use that in the |
hmm, I don't really see an overlap between payload definition and the instance's lifecycle ... |
and I do believe that, if you really want to differentiate payload based some parameter, you do want to differentiate the Service ... and if you don't want to specify those classes explicitly but rather insist on having them created programatically, such a class factory would be the best solution ... |
I no longer think this is worth considering. |
This would be nice:
I understand this could be solved by providing
payload
inGolem.run_service
, instead ofasync def get_payload()
, but I think it's convenient to have all such logic in a single place.This is not important. But maybe this is easy? Could be useful.
(I found this doesn't work because I wrote this code & it didn't work, so that's not a 100% abstract thing).
The text was updated successfully, but these errors were encountered: