I need to delete a job from a deleted project. All job related data have been deleted at the filesystem level: the project was created on incorrect filesystem location and then was deleted after job submission.
I tried the cli command:
cryosparcm cli "set_job_status('P1', 'J2', 'killed')"
Encountered error for method "set_job_status" with params ('P1', 'J2', 'killed'):
ServerError: validation error: lock file for P1 not found at /home_local/cryosparc/username/P1/cs.lock
Traceback (most recent call last):
File "/home_local/cryosparc/cryosparc2_master/cryosparc_command/commandcommon.py", line 139, in wrapper
res = func(*args, **kwargs)
File "/home_local/cryosparc/cryosparc2_master/cryosparc_command/commandcommon.py", line 191, in wrapper
lockfile_path_abs), f"validation error: lock file for {project_uid} not found at {lockfile_path_abs}"
AssertionError: validation error: lock file for P1 not found at /home_local/cryosparc/username/P1/cs.lock
Creating cs.lock file is obviously insufficient to remove it as well.
Is there any low level database command to solve this ?
Thank you
JC
cryosparcm icli
# to delete the job
db.jobs.update_one({'uid': 'J2', 'project_uid': 'P1'}, {'$set': {'deleted': True}})
# and if you would like to delete the project too
db.projects.update_one({'uid':'P75'}, {'$set': {'deleted':True}})
Sorry about not yet provide sufficient info, and thank you for following up.
yes the project data related to the live session has been accidentally remove from the file system, and in âcryosparcm log command_coreâ, it continuously reports the following JSONRPC ERROR at dump_workspaces repeatedly.
JSONRPC ERROR at dump_workspaces
2023-10-06 09:54:04,510 COMMAND.COMMON wrapper ERROR | Traceback (most recent call last):
2023-10-06 09:54:04,510 COMMAND.COMMON wrapper ERROR | File â/apps/cryosparc_master/cryosparc_command/commandcommon.pyâ, line 200, in wrapper
2023-10-06 09:54:04,510 COMMAND.COMMON wrapper ERROR | res = func(*args, **kwargs)
2023-10-06 09:54:04,510 COMMAND.COMMON wrapper ERROR | File â/apps/cryosparc_master/cryosparc_command/commandcommon.pyâ, line 262, in wrapper
2023-10-06 09:54:04,510 COMMAND.COMMON wrapper ERROR | assert not project[âarchivedâ], f"validation error: project {project_uid} is archived"
2023-10-06 09:54:04,510 COMMAND.COMMON wrapper ERROR | AssertionError: validation error: project P38 is archived
I tried serveral attempts to manually remove the project from the mongodb database via cryosparc icli, but currently there have been no success⌠including update_one with âdeletedâ: True.
I also tried to take over the project again within cryosparc icli: cli.take_over_project(project_uid=âP38â, force=True) and then cli.delete_project(project_uid=âP38â), but the log command_core still continuously do the polling error of JSONRPC.
If I search through db.workspaces.find with running:
@qitsweauca Caution: We are not sure about the current state of your CryoSPARC instance and therefore unsure about the ultimate effect the following suggestions may have. Please backup your database and ensure there are no legitimate Live sessions running on your CryoSPARC instance if you wish to proceed (at your own risk):