If celery is not running, first I used call_command() to stop celery and celerybeat.
I did not use call_command() to restart celery, because call_command() is a blocking function call and it blocks Django from running the following lines. Instead, I run celery in the background using os.popen('python manage.py startcelery &')
2. random->lhs when lacking data for this workload
If there is no background task for this workload, we generate 10 recommendation configs with the lhs algorithm instead of the random algorithm.
3. query and edit the session hyperparameters
I feel that we can use the existing backdoor method in the driver fabfile to query and edit the session hyperparameters. The arguments format should be as follows:
There are ' around the json string
There is \ before any comma in the json string
There is no \ before " in the json string
Examples:
querying command:
fab edit_website_session:username=user,password=abcd123,project_name=oracle,dbms_type=Oracle,dbms_version=12.2.0.1.0,name=session_name,verbose=True
1. check celery status before running tasks
If celery is not running, first I used
call_command()
to stop celery and celerybeat. I did not usecall_command()
to restart celery, becausecall_command()
is a blocking function call and it blocks Django from running the following lines. Instead, I run celery in the background usingos.popen('python manage.py startcelery &')
2. random->lhs when lacking data for this workload
If there is no background task for this workload, we generate 10 recommendation configs with the lhs algorithm instead of the random algorithm.
3. query and edit the session hyperparameters
I feel that we can use the existing backdoor method in the driver fabfile to query and edit the session hyperparameters. The arguments format should be as follows:
Examples: