Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
455bf53ba6 | ||
|
|
454aa6ccda | ||
|
|
85ffebb3fa |
@@ -39,29 +39,32 @@ class Command(BaseCommand):
|
|||||||
|
|
||||||
# convert autotask to the new format
|
# convert autotask to the new format
|
||||||
for task in AutomatedTask.objects.all():
|
for task in AutomatedTask.objects.all():
|
||||||
edited = False
|
try:
|
||||||
|
edited = False
|
||||||
|
|
||||||
# convert scheduled task_type
|
# convert scheduled task_type
|
||||||
if task.task_type == "scheduled":
|
if task.task_type == "scheduled":
|
||||||
task.task_type = "daily"
|
task.task_type = "daily"
|
||||||
task.run_time_date = make_aware(
|
task.run_time_date = make_aware(
|
||||||
dt.datetime.strptime(task.run_time_minute, "%H:%M")
|
dt.datetime.strptime(task.run_time_minute, "%H:%M")
|
||||||
)
|
)
|
||||||
task.daily_interval = 1
|
task.daily_interval = 1
|
||||||
edited = True
|
edited = True
|
||||||
|
|
||||||
# convert actions
|
# convert actions
|
||||||
if not task.actions:
|
if not task.actions:
|
||||||
task.actions = [
|
task.actions = [
|
||||||
{
|
{
|
||||||
"type": "script",
|
"type": "script",
|
||||||
"script": task.script.pk,
|
"script": task.script.pk,
|
||||||
"script_args": task.script_args,
|
"script_args": task.script_args,
|
||||||
"timeout": task.timeout,
|
"timeout": task.timeout,
|
||||||
"name": task.script.name,
|
"name": task.script.name,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
edited = True
|
edited = True
|
||||||
|
|
||||||
if edited:
|
if edited:
|
||||||
task.save()
|
task.save()
|
||||||
|
except:
|
||||||
|
continue
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ EXE_DIR = os.path.join(BASE_DIR, "tacticalrmm/private/exe")
|
|||||||
AUTH_USER_MODEL = "accounts.User"
|
AUTH_USER_MODEL = "accounts.User"
|
||||||
|
|
||||||
# latest release
|
# latest release
|
||||||
TRMM_VERSION = "0.11.1"
|
TRMM_VERSION = "0.11.2"
|
||||||
|
|
||||||
# bump this version everytime vue code is changed
|
# bump this version everytime vue code is changed
|
||||||
# to alert user they need to manually refresh their browser
|
# to alert user they need to manually refresh their browser
|
||||||
|
|||||||
Reference in New Issue
Block a user