Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/actinia_core/rest/base/resource_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,14 @@ def preprocess(
]
self.job_timeout = int(process_time_limit * process_num_limit * 20)

# IDEA: maybe here we can also ask for the user the (
# self.user_credentials["vm_definition"]):
# * VM size
# * number of worker per VM
# * mounts
# * ...
# return directly an error message (create_response_from_model)

# Create the resource URL base and use a placeholder for the file name
# The placeholder __None__ must be replaced by the resource URL
# generator
Expand Down
10 changes: 10 additions & 0 deletions src/actinia_core/rest/ephemeral_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ def post(self, location_name):
rdc = self.preprocess(location_name=location_name)

if rdc:
# IDEA: here VM start (asyncron - subprocess?)
# QUESTION:
# * set status to accepted or to startingVM?
# * consider from "queue_type": only if "per_job", "per_user" the VM should be started?
# prepare_actinia(vm_size, queue_name (created in enqueue_job))
# * check if VM already run (if only one VM should be started per user)
# * start VM
# * install actinia
# * start worker for queue_name (execute_actinia)
# vm_size, ... in preprocess (attributes of rdc?)
enqueue_job(self.job_timeout, start_job, rdc)

html_code, response_model = pickle.loads(self.response_data)
Expand Down