Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding when= to a Folder as documented does not render when deployed #22

Open
jfink5 opened this issue Jan 13, 2023 · 0 comments
Open
Assignees
Labels
Under Research under review by team

Comments

@jfink5
Copy link

jfink5 commented Jan 13, 2023

folder = Folder("SampleFolder", when=Folder.When(week_days=['SUN']...)

That code only works with Job objects, not Folders. It generates JSON where the when gets ignored on deployment. At the Folder level RuleBasedCalendars require a "name" and that's missing.

I used the following code to correctly implement a when with RuleBasedCalendars in a Folder...

mycal = CalendarRuleBased("mwf", when=Folder.When(week_days=['MON', 'WED', 'FRI'])) workflow.add( Folder( "SampleFolder", order_method = "Manual", when=Folder.When( rule_based_calendars=Folder.When.RuleBasedCalendars( # this is a list of CalendarRuleBased objects calendar_rule_based_list=[mycal], # this is the complete list of folder based and global RuleBasedCalendars included=["mwf", "EVERYDAY", "jfi-weekdays3", "jfi-friday"] ), from_time="1000" ) ) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Under Research under review by team
Projects
None yet
Development

No branches or pull requests

3 participants