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

async project exec #7686

Merged
merged 6 commits into from
Jul 17, 2024
Merged

async project exec #7686

merged 6 commits into from
Jul 17, 2024

Conversation

haraldschilly
Copy link
Contributor

@haraldschilly haraldschilly commented Jul 12, 2024

Description

  • implementing API for async project exec #7666 for the project itself
  • adding more details to the v2 API (some were missing)
  • more tests
  • typescript aggregate.js
  • my main confusion was this new openapi validation, which is not working as I assumed, when there are more options for the input object. In any case, I think the code I wrote goes into the correct direction.
  • the only real change for existing calls is adding a new {type: "blocking"} indicator to the response. I can't think of any reason why this is could become a problem.

Checklist:

  • Testing instructions are provided, if not obvious
  • Release instructions are provided, if not obvious

@haraldschilly haraldschilly force-pushed the api-project-exec-async-7666 branch 5 times, most recently from 930eaaf to d744c80 Compare July 12, 2024 14:52
@haraldschilly haraldschilly force-pushed the api-project-exec-async-7666 branch 2 times, most recently from e0dd6ab to 8cb6d5b Compare July 12, 2024 16:58
@haraldschilly haraldschilly force-pushed the api-project-exec-async-7666 branch 4 times, most recently from 984ea3f to b4cca76 Compare July 15, 2024 14:52
@haraldschilly haraldschilly force-pushed the api-project-exec-async-7666 branch 12 times, most recently from 5c482b9 to f0b95f4 Compare July 16, 2024 16:51
@@ -20,12 +40,24 @@ export interface ExecuteCodeOptions {
env?: object; // if given, added to exec environment
aggregate?: string | number; // if given, aggregates multiple calls with same sequence number into one -- see @cocalc/util/aggregate; typically make this a timestamp for compiling code (e.g., latex).
verbose?: boolean; // default true -- impacts amount of logging
async_call?: boolean; // default false -- if true, return an ID and execute it asynchroneously
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" asynchroneously" is not spelled right.

job_id,
status: "running",
};
asyncCache.set(job_id, started);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jonathan: you could use a third arg to set the timeout here to be bigger than opts.timeout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants