Skip to content

Commit

Permalink
Py3.6 Scheduled tasks import paths fix, snapshot & scub rockstor#2570
Browse files Browse the repository at this point in the history
Fix missing import paths for Py3.6.
Affected snapshot & scrub tasks post the Py3.6 transition.
Copywrite date and http to https updated on changed files.
  • Loading branch information
phillxnet committed Jun 7, 2023
1 parent b04fb03 commit da98f33
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
14 changes: 10 additions & 4 deletions src/rockstor/scripts/scheduled_tasks/crontabwindow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com>
Copyright (c) 2012-2023 RockStor, Inc. <https://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
Expand All @@ -13,13 +13,19 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""

from datetime import datetime, time

# Crontabwindow created as a separate module to avoid code duplication on
# snapshots and scrubs tasks
"""
Crontabwindow created as a separate module to avoid code duplication:
See scheduled_tasks/
- snapshots.py
- pool_scrub.py
- reboot_shutdown.py
"""



def crontab_range(range):
Expand Down
6 changes: 3 additions & 3 deletions src/rockstor/scripts/scheduled_tasks/pool_scrub.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com>
Copyright (c) 2012-2023 RockStor, Inc. <https://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
Expand All @@ -13,14 +13,14 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""

import time
import sys
import json
from datetime import datetime
import crontabwindow # load crontabwindow module
from scripts.scheduled_tasks import crontabwindow
from smart_manager.models import Task, TaskDefinition
from cli.api_wrapper import APIWrapper
from django.utils.timezone import utc
Expand Down
6 changes: 3 additions & 3 deletions src/rockstor/scripts/scheduled_tasks/snapshot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com>
Copyright (c) 2012-2023 RockStor, Inc. <https://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
Expand All @@ -13,13 +13,13 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""

import sys
import json
from datetime import datetime
import crontabwindow # load crontabwindow module
from scripts.scheduled_tasks import crontabwindow
from storageadmin.models import Share, Snapshot
from smart_manager.models import Task, TaskDefinition
from cli.api_wrapper import APIWrapper
Expand Down

0 comments on commit da98f33

Please sign in to comment.