Skip to content

Releases: jomorais/pyfase

Improvements on FSM

21 Jun 18:54
Compare
Choose a tag to compare
  • on_idle callback is now called on_default_state
  • the on_default_state can be called continuously every on_default_state_time
  • add method set_new_default_state_time:
self.set_new_default_state_time(3.5)  # sets on_default_state_time to 3.5 seconds

Implementation of a simple Finite-State-Machine inside your service

21 Jun 14:32
Compare
Choose a tag to compare
  • Implementation of a simple Finite-State-Machine inside your service. just add a "MicroService.state" decorator upper any method with follow structure: def method_as_state(self, data):
@MicroService.state
def download(self, data):
    > put your state logic here <
  • to start Finite-State-Machine, you should enable the fsm functionality as follow:
MyService().execute(enable_fsm=True)
  • to request a state to be executed, you should call self.request_state method:
self.request_state(next_state='download', data="http://url/file_to_download.json")

## response feature ##

31 May 19:37
d94b218
Compare
Choose a tag to compare

response feature

  • When a service A requests an 'action' to service B: service B now can respond to service A by self.response(data) method inside the 'action' context, by this way service B can send some data related about the 'action' previous performed without need to request a new action to service A. see 'database' example

Improvements of broadcast in 1.0.1

29 Jun 13:04
Compare
Choose a tag to compare

Fix name server broadcast issue

Release 1.0.1

22 Mar 14:45
Compare
Choose a tag to compare
  • fix setup.py
  • rename fase module to pyfase
  • service base class is now named "MicroService"