class MyService:
name = 'my_service'
rivescript = MyThing()
With the above, SlowThing() will be init'd for each request to the service.
What's the best way to have just one instance of SlowThing() upon service
startup? Should I make that class a singleton? Or is there a better
recommended way?
class MyService:
name = 'my_service'
rivescript = MyThing()
With the above, SlowThing() will be init'd for each request to the
service.
What's the best way to have just one instance of SlowThing() upon service
startup? Should I make that class a singleton? Or is there a better
recommended way?
class MyService:
name = 'my_service'
rivescript = MyThing()
With the above, SlowThing() will be init'd for each request to the
service.
What's the best way to have just one instance of SlowThing() upon
service startup? Should I make that class a singleton? Or is there a better
recommended way?