Skip to content

Commit

Permalink
Merge pull request #687 from nearbeach/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
robotichead authored Oct 9, 2024
2 parents 26e08ea + 1ad1ff0 commit 8537843
Show file tree
Hide file tree
Showing 292 changed files with 10,330 additions and 2,205 deletions.
24 changes: 16 additions & 8 deletions NearBeach/management/commands/runscheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def handle(self, *args, **kwargs):
scheduled_objects = []


def create_object(self, scheduled_object, *args, **kwargs):
@staticmethod
def create_object(scheduled_object, *args, **kwargs):
#TODO: Print off a log when creating these tasks/projects

# Get the template
Expand Down Expand Up @@ -89,7 +90,8 @@ def create_object(self, scheduled_object, *args, **kwargs):
return


def run_set_day_of_the_week(self):
@staticmethod
def run_set_day_of_the_week():
# Get today's date and day of the week
todays_date = datetime.date.today()
todays_day = calendar.day_name[todays_date.weekday()].lower()
Expand All @@ -112,7 +114,8 @@ def run_set_day_of_the_week(self):



def run_weekly(self):
@staticmethod
def run_weekly():
todays_date = datetime.date.today()
day_of_the_week = calendar.day_name[todays_date.weekday()]

Expand All @@ -134,7 +137,8 @@ def run_weekly(self):
)


def run_fortnightly(self):
@staticmethod
def run_fortnightly():
todays_date = datetime.date.today()
day_of_the_week = calendar.day_name[todays_date.weekday()]
last_run = todays_date - datetime.timedelta(days=14)
Expand All @@ -158,7 +162,8 @@ def run_fortnightly(self):
)


def run_monthly(self):
@staticmethod
def run_monthly():
todays_date = datetime.date.today()
last_run = todays_date - datetime.timedelta(days=14)

Expand All @@ -180,7 +185,8 @@ def run_monthly(self):
)


def run_start_of_the_month(self):
@staticmethod
def run_start_of_the_month():
# If today is not the 1st - we will just leave
todays_date = datetime.date.today()
if todays_date.day != 1:
Expand All @@ -203,7 +209,8 @@ def run_start_of_the_month(self):
)


def run_end_of_the_month(self):
@staticmethod
def run_end_of_the_month():
# If today is not the end of the month - we will just leave
todays_date = datetime.date.today()
end_month_date = calendar.monthrange(todays_date.year, todays_date.month)[1]
Expand All @@ -227,7 +234,8 @@ def run_end_of_the_month(self):
)


def run_x_days_before_end_of_the_month(self):
@staticmethod
def run_x_days_before_end_of_the_month():
# If today's date is earlier than the 14th, just leave
todays_date = datetime.date.today()
if todays_date.day < 14:
Expand Down
1 change: 1 addition & 0 deletions NearBeach/static/NearBeach/331.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added NearBeach/static/NearBeach/331.min.js.gz
Binary file not shown.
1 change: 1 addition & 0 deletions NearBeach/static/NearBeach/4619.min.js

Large diffs are not rendered by default.

Binary file added NearBeach/static/NearBeach/4619.min.js.gz
Binary file not shown.
1 change: 1 addition & 0 deletions NearBeach/static/NearBeach/5162.min.js

Large diffs are not rendered by default.

Binary file added NearBeach/static/NearBeach/5162.min.js.gz
Binary file not shown.
1 change: 1 addition & 0 deletions NearBeach/static/NearBeach/7582.min.js

Large diffs are not rendered by default.

Binary file added NearBeach/static/NearBeach/7582.min.js.gz
Binary file not shown.
Loading

0 comments on commit 8537843

Please sign in to comment.