Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Improve ISC of scheduled functions #1108

Closed
danez opened this issue Jun 10, 2022 · 1 comment
Closed

Improve ISC of scheduled functions #1108

danez opened this issue Jun 10, 2022 · 1 comment
Assignees
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@danez
Copy link
Contributor

danez commented Jun 10, 2022

At the moment, we try to analyze a function and figure out if it is scheduled or not. If we cannot find the call to schedule() or cannot find the cron expression, we assume it is not a scheduled function. This sometimes leads to scheduled functions not being detected as such, but instead of erroring we continue and deploy it as a normal function.

To improve this we should make some changes that improve the UX:

  1. Simplify detection of scheduled functions. Maybe even just checking if the schedule helper is imported and if so, mark the function as scheduled. The idea is to make this as simple as possible and choose a characteristic of a scheduled function that we can nearly 100% of the time detect.
  2. Once the function is marked as scheduled, start searching for the actual cron expression. If we are not able to find it error and let the user know that our code detection wasn't able to find the schedule expression.
@danez danez added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jun 10, 2022
@danez danez self-assigned this Jun 14, 2022
@jenae-janzen
Copy link
Contributor

Closed with #1123

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

2 participants