Skip to content

Implement eldritch time.sleep function #327

@hulto

Description

@hulto

Is your feature request related to a problem? Please describe.
Now that realm supports long running jobs one of the cool things we should enable is constantly updating tasks.
For example if you want to get the latest status of the process list or firewall rules instead of requeue the tome we can have looped tasks that would look like this:

def check_firewall():
    while true:
        print(sys.shell("iptables -L")['stdout'])
        time.sleep(5*60)

check_firewall()

In order to support this though we need a way to pause a tomes execution otherwise it will constantly loop.

Describe the solution you'd like
Implement a time.sleep function.

Describe alternatives you've considered
Calling the native system sleep will cause weird process tree artifacts.

Additional context
Na

Metadata

Metadata

Assignees

Labels

eldritchRelated to the Eldritch languagefeatureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions