Skip to content
This repository was archived by the owner on Jan 10, 2019. It is now read-only.
This repository was archived by the owner on Jan 10, 2019. It is now read-only.

Timer fires but no logic run after until workflow times out or exceeds event limit #113

@mustafashabib

Description

@mustafashabib

made an example repo: https://github.com/mustafashabib/aws-flow-timer-tests

Playing around with Timers

Seeing weird behavior when you set a timer, it fires, and you have additional code to run
(especially calling an activity via an activity client) from within a method body.

It mostly doesn't work in my tests, but occassionally does work.

This is super confusing.

When it fails, I see the timer fire properly but the subsequent next line of
code never runs - I know this because it is an activity call and I see no call scheduled.

Instead, the SWF workflow sits there and decision tasks get scheduled and timed out until
either the EVENT LIMIT for the workflow is met and the workflow terminated or if the workflow
timeout is exceeded and the workflow is again terminated.

What seems To Always Work

Unrolling all the logic out of workflow methods and putting them into the
main body of the workflow entry point method seems to always work. I tested
this by starting several concurrent workflows while running this code and all
were completed successfully as expected.

When I move the create_timer call and client.echo('something') calls to
a method body such as def schedule_timer_and_echo_via_client() then call
that method from the main workflow method, it sometimes works but mostly does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions