Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

feat: Allow tasks to redefine their triggers by returning a trigger #610

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

silasary
Copy link
Collaborator

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

It's incredibly niche, but it'd make my life a lot easier.
This allows a task to return a Replacement Trigger, allowing tasks to dynamically adjust themselves based on load or external influences.

This definitely needs to get documented somewhere, but that's for the docs branch.

Changes

  • Checks the return type of tasks, and if it's a Trigger, replace the existing one.

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@silasary silasary added Improvement Something that is already implemented but can be done better New Feature::Library A new feature for the library labels Aug 18, 2022
@silasary silasary changed the title Feat: Allow tasks to redefine their triggers by returning a trigger feat: Allow tasks to redefine their triggers by returning a trigger Aug 18, 2022
@LordOfPolls
Copy link
Member

This is targeting master. Are you sure that's what you wanted?

@silasary
Copy link
Collaborator Author

It is not. But I can't retarget in the mobile app

@LordOfPolls LordOfPolls changed the base branch from master to dev August 18, 2022 07:16
@LordOfPolls
Copy link
Member

done

@LordOfPolls LordOfPolls merged commit bf323a5 into dev Aug 18, 2022
@LordOfPolls LordOfPolls deleted the dynamic-tasks branch August 18, 2022 07:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Improvement Something that is already implemented but can be done better New Feature::Library A new feature for the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants