mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Switch backup action to new schedule syntax (#3801)
This commit is contained in:
parent
0bea2c7b56
commit
b456a15dfc
@ -65,12 +65,6 @@ class InvenTreeConfig(AppConfig):
|
||||
)
|
||||
logger.info("Started background tasks...")
|
||||
|
||||
# Make regular backups
|
||||
InvenTree.tasks.schedule_task(
|
||||
'InvenTree.tasks.run_backup',
|
||||
schedule_type=Schedule.DAILY,
|
||||
)
|
||||
|
||||
def update_exchange_rates(self): # pragma: no cover
|
||||
"""Update exchange rates each time the server is started.
|
||||
|
||||
|
@ -342,6 +342,7 @@ def update_exchange_rates():
|
||||
logger.error(f"Error updating exchange rates: {e}")
|
||||
|
||||
|
||||
@scheduled_task(ScheduledTask.DAILY)
|
||||
def run_backup():
|
||||
"""Run the backup command."""
|
||||
call_command("dbbackup", noinput=True, clean=True, compress=True, interactive=False)
|
||||
|
Loading…
Reference in New Issue
Block a user